Skip to content
Mathias Wulff edited this page Dec 15, 2025 · 5 revisions

Keyword UNION

Syntax:

    SELECT ... UNION SELECT ... [ORDER BY ...]

You can use ORDER BY clause to sort the result of the UNION.

    SELECT * FROM table1 UNION SELECT * FROM table2 ORDER BY column1

See also: [UNION ALL](Union All), INTERSECT, EXCEPT, CORRESPONDING

Clone this wiki locally