Skip to main contentSkip to solution

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).

Keyboard Shortcuts

  • Left arrow: Previous question
  • Right arrow: Next question
  • S key: Jump to solution
  • Q key: Jump to question