Intermediate Database Management Systems
Q65 / 100

What is the difference between UNION and UNION ALL?

Correct! Well done.

Incorrect.

The correct answer is B) UNION removes duplicates from combined results; UNION ALL keeps all rows including duplicates and is faster

B

Correct Answer

UNION removes duplicates from combined results; UNION ALL keeps all rows including duplicates and is faster

Explanation

UNION performs a DISTINCT sort to remove duplicates (slower). UNION ALL appends all rows from both queries without duplicate removal (faster). Use UNION ALL when duplicates are acceptable or not possible.

Progress
65/100