Använder Union All
och Null
som en annan kolumn:
SELECT col_1, col_2, NULL as col_3, NULL as col_4,
date_1, NULL as date_2
FROM table_1
Union All
SELECT NULL, NULL, col_3, col_4, NULL, date_2
FROM table_2
Använder Union All
och Null
som en annan kolumn:
SELECT col_1, col_2, NULL as col_3, NULL as col_4,
date_1, NULL as date_2
FROM table_1
Union All
SELECT NULL, NULL, col_3, col_4, NULL, date_2
FROM table_2