Which of the following operations can be performed with the UNION clause in SQL?
Which of the following operations can be performed with the UNION clause in SQL?
Solution
✅ Correct Option: 2
UNION combines the result sets of two SELECT queries into one and removes duplicate rows. Both queries must have the same number of columns with compatible data types.
Option 1: common rows are fetched with INTERSECT, not UNION.
Option 3: allowing duplicates is done with UNION ALL, which does not remove repeated rows.
Option 4: UNION stacks rows from the two queries; it does not place columns side by side (that is what a JOIN does).
Related questions:
2025: 30 May Shift 2
2025: 16 May Shift 1
2026: 23 May Shift 2
2026: 24 May Shift 1