SQL UNION Keyword
UNION
The UNION
command combines the result set of two or more SELECT statements (only
distinct values)
The following SQL statement returns the cities (only distinct values) from both the "Customers" and the "Suppliers" table:
The UNION
command combines the result set of two or more SELECT statements (only
distinct values)
The following SQL statement returns the cities (only distinct values) from both the "Customers" and the "Suppliers" table:
If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail:
sales@w3schools.com
If you want to report an error, or if you want to make a suggestion, send us an e-mail:
help@w3schools.com