How to build "dummy columns" for UNION?
Hi,
You can use,
SELECT "City", "Country", "Continent" from table1
UNION
SELECT "City", "Country", ' ' as "Continent" from table2
or
SELECT "City", "Country", "Continent" from table1
UNION
SELECT
"City", "Country", NULL as "Continent" from table2
It considers "Continent" as null in table2
You can always add "virtual" columns:
SELECT "City", "Country", "Continent" from table1
UNION
SELECT "City", "Country", NULL AS "Continent" from table2