MySQL UNION ALL

Combining with duplicates.

MySQL UNION ALL Operator

The UNION ALL operator combines the result-set of two or more SELECT statements.

Unlike UNION, UNION ALL selects all values, including duplicates.

Because it doesn't need to check for distinct values, UNION ALL is often faster than UNION.

Example

SELECT City FROM Customers UNION ALL SELECT City FROM Suppliers ORDER BY City;