sajad torkamani

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
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