Combine results with UNION

UNION removes duplicates. UNION ALL keeps them and is faster.

SQL · Combine results with UNIONBeginner
SELECT name, 'customer' AS type FROM customers
UNION ALL
SELECT name, 'product' AS type FROM products
ORDER BY name;
unionunion all