UNION
UNION combines the result sets of two or more SELECT queries into one, removing duplicate rows by default. UNION ALL keeps every row, including duplicates, and skips the deduplication step — making it faster.
Both queries need the same number of columns, in the same order, with compatible data types — column names in the final result come from the first query.
Reach for UNION ALL whenever you know the two result sets can't overlap, or duplicates are acceptable — it avoids the sort/hash operation UNION needs to find and remove duplicates.
Example
SELECT city, 'customer' AS source FROM customers
UNION ALL
SELECT city, 'supplier' AS source FROM suppliers;