What is the difference between UNION and UNION ALL?
- A UNION removes duplicate rows; UNION ALL keeps them and is faster
- B UNION ALL removes duplicates
- C UNION joins tables horizontally
- D They are identical
Answer
UNION removes duplicate rows; UNION ALL keeps them and is faster
Deduplication requires sorting or hashing, so UNION ALL should be preferred whenever duplicates are impossible or acceptable.





