UNION ALL With WHERE
suggest changeUNION ALL to select all(duplicate values also) German cities from the “Customers” and “Suppliers” tables. Here Country="Germany"
is to be specified in the where clause.
Query:
SELECT City, Country FROM Customers
WHERE Country='Germany'
UNION ALL
SELECT City, Country FROM Suppliers
WHERE Country='Germany'
ORDER BY City;
Result:
Number of Records: 14
City | Country |
---|---|
Aachen | Germany |
Berlin | Germany |
Berlin | Germany |
Brandenburg | Germany |
Cunewalde | Germany |
Cuxhaven | Germany |
Frankfurt | Germany |
Frankfurt a.M. | Germany |
Köln | Germany |
Leipzig | Germany |
Mannheim | Germany |
München | Germany |
Münster | Germany |
Stuttgart | Germany |
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents