SQL More Advanced Flashcards
1
Q
UNION
A
Combines the results of two or more SELECT
The SELECT statements need to have the same number of columns. Columns must have similar types. Columns from each SELECT statement must be in the same order
SELECT column1, column2 FROM table
UNION
SELECT column3, column4 FROM table2;
2
Q
UNION ALL
A
Same as UNION but deduplicates.