Current location - Quotes Website - Team slogan - What does mysql's query statement union mean?
What does mysql's query statement union mean?
The UNION operator is used to merge the result sets of two or more SELECT statements.

Note that the SELECT statements in the UNION must have the same number of columns. Columns must also have similar data types. At the same time, the column order in each SELECT statement must be the same.

By default, the UNION operator takes different values. If duplicate values are allowed, use UNION ALL.

Is to combine the two results into one.