Is it possible to select 2 columns in just one and combine them?
Example:
select something + somethingElse as onlyOneColumn from someTable
Select the same number of columns for each query. Corresponding columns must be the same general data type. Corresponding columns must all either allow null values or not allow null values. If you want to order the columns, specify a column number because the names of the columns you are merging are probably different.
SELECT COALESCE(column1,'') + COALESCE(column2,'') FROM table1. For this example, if column1 is NULL , then the results of column2 will show up, instead of a simple NULL .
(SELECT column1 as column FROM table ) UNION (SELECT column2 as column FROM table )
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With