Combining the results of multiple queries (UNION, EXCEPT, INTERSECT, MINUS, subqueries)
UNION
Limitations
UNION syntax
SELECT column_name(s) FROM table1
UNION
SELECT column_name(s) FROM table2;UNION ALL Syntax
SELECT column_name(s) FROM table1
UNION ALL
SELECT column_name(s) FROM table2;EXCEPT/INTERSECT
Syntax
Examples
MINUS
Syntax
Subqueries
Restrictions
Example
PreviousAggregations (ORDER BY, GROUP BY, HAVING, SUM, COUNT, AVG, etc)NextSessions, transactions, locks
Last updated