What is the purpose of the UNION operator?
- A To join two tables on a common column
- B To combine the result sets of two SELECT statements, removing duplicates
- C To update multiple tables at once
- D To create a new table from two others
Answer
To combine the result sets of two SELECT statements, removing duplicates
UNION combines rows vertically and removes duplicates. UNION ALL keeps duplicates and is faster because it skips the deduplication step.





