PostgreSQL

PostgreSQL UNION

Combine the results of compatible SELECT statements.

Combine result sets

SELECT name FROM products
UNION
SELECT name FROM archived_products;

Both queries must return the same number of compatible columns. UNION removes duplicate rows; use UNION ALL to keep them.