Oracle Database SQL — Question 55
Which two statements are true about the results of using the INTERSECT operator in compound queries? (Choose two.)
Answer options
- A. The number of columns in each SELECT in the compound query can be different.
- B. INTERSECT returns rows common to both sides of the compound query.
- C. INTERSECT ignores NULLs.
- D. Columns named in each SELECT in the compound query can be different.
- E. Reversing the order of the intersected tables can sometimes affect the output.
Correct answer: B, D
Explanation
The correct answer is B, which states that INTERSECT returns rows that are common to both queries, reflecting its primary function. D is also correct because the columns in each SELECT can indeed be different as long as they are compatible in type. A is incorrect because the number of columns must be the same, C is wrong since INTERSECT does account for NULLs, and E is false because reversing the order does not impact the output of INTERSECT.