Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
UNION
8. The keyword UNION ALL
INTERSECT
EXCEPT

Instruction

Good. By default, UNION removes duplicate rows. Luckily, we can change that. Just put UNION ALL instead of UNION in your query:

SELECT
  *
FROM Cycling
WHERE Country = N'Germany'
UNION ALL
SELECT
  *
FROM Skating
WHERE Country = N'Germany';

You'll get all rows, even when they are the same.

Exercise

Show all countries that have medals in cycling or skating. Use a UNION. Don't remove duplicates.

Stuck? Here's a hint!

Type:

SELECT
  Country
FROM Cycling
UNION ALL
SELECT
  Country
FROM Skating;