MySQL: Union reference
21 August 2023 (Updated 21 August 2023)
In a nutshell
The UNION
operator lets you combine the result sets of two or more SELECT
statements with something like:
SELECT column_name(s) FROM table1
UNION
SELECT column_name(s) FROM table2;
It will only work if every SELECT
statement contains the same number of columns in the same order and of the same data type.
Tagged:
MySQL
Thanks for your comment 🙏. Once it's approved, it will appear here.
Leave a comment