IBM DB2 11.1 Advanced DBA for Linux, UNIX, and Windows — Question 21
Which of the following set operators can be used to find all rows that are common in 2 queries?
Answer options
- A. UNION
- B. UNION ALL
- C. EXCEPT ALL
- D. INTERSECT ALL
Correct answer: B
Explanation
The correct answer is B, UNION ALL, as it includes all records from both queries, including duplicates. The other options do not accurately capture all common rows; UNION removes duplicates, EXCEPT ALL excludes rows present in the second query, and INTERSECT ALL is not a standard SQL operator.