1Z0-082 practice question 17 of 25

Which two statements are true about the results of using the INTERSECT operator in compound queries? (Choose two.)

Full set: 142 questions
Answer options
A: Column names in each SELECT in the compound query can be different Correct answer
B: The number of columns in each SELECT in the compound query can be different
C: Reversing the order of the intersected tables can sometimes affect the output
D: INTERSECT returns rows common to both sides of the compound query Correct answer
E: INTERSECT ignores NULLs
Correct Answer:
A. Column names in each SELECT in the compound query can be different; D. INTERSECT returns rows common to both sides of the compound query
Explanation

INTERSECT returns only the rows that exist in the result sets of both SELECT statements (D). Column names in each SELECT may differ because Oracle derives the column names of the compound result from the first SELECT only; equivalence is required only in number and data types, not in names (A).

Why Incorrect

B. Both SELECT statements must project the same number of columns.
C. INTERSECT is commutative; reversing order does not change the result set.
E. Set operators treat NULLs as comparable; rows containing NULLs are included if identical.

References

1. Oracle Database 19c SQL Language Reference, “Set Operators”, sec. 7.2, Rules 2 & 4.

2. Oracle Database 19c SQL Language Reference, Example 7-4 (INTERSECT usage and column‐naming rules).

Scroll to Top