I have a query
select abc from table1 union select def from table2
I want the results to be clubbed together as a different header.
I am trying
Select * as diff (select abc from table1 union select def from table2)
What should be the query so that the result is clubbed in a third column header diff.
Thanks
If I understand correctly, you would like to have a custom column name in the outer query.
You can do that by specifically referencing the column which you would like to rename.
Here is an example:
Results in:
For reference see: http://sqlize.com/7RKZw41Hqx