Intermediate SQL
Q45 / 100

What is the difference between UNION and UNION ALL?

Correct! Well done.

Incorrect.

The correct answer is B) UNION removes duplicate rows from the combined result, while UNION ALL keeps all rows including duplicates, making it generally faster

B

Correct Answer

UNION removes duplicate rows from the combined result, while UNION ALL keeps all rows including duplicates, making it generally faster

Explanation

UNION performs an implicit DISTINCT on the combined results (requiring a sort/dedup step), whereas UNION ALL simply concatenates results without removing duplicates.

Progress
45/100