oracle sql union tables with different columns

Solutions on MaxInterview for oracle sql union tables with different columns by the best coders in the world

showing results for - "oracle sql union tables with different columns"
Luigi
12 May 2019
1-- Add extra columns as null for the table having less columns like:
2SELECT COL1, COL2, COL3, COL4, COL5 FROM TABLE1
3UNION
4SELECT COL1, COL2, COL3, NULL AS COL4, NULL AS COL5 FROM TABLE2