The UNION command merges the result sets of two or more SELECT statements, considering only distinct values.
The provided SQL statement retrieves the cities (only distinct values) from both the “Customers” and the “Suppliers” table:
SELECT City FROM Customers UNION SELECT City FROM Suppliers ORDER BY City; |