Oracle Database SQL — Question 17
Which is the default column or columns for sorting output from compound queries using SET operators such as INTERSECT in a SQL statement?
Answer options
- A. the first VARCHAR2 column in the first SELECT of the compound query
- B. the first column in the first SELECT of the compound query
- C. the first NUMBER column in the first SELECT of the compound query
- D. the first NUMBER or VARCHAR2 column in the last SELECT of the compound query
- E. the first column in the last SELECT of the compound query
Correct answer: B
Explanation
The correct answer is B because the default sorting column for compound queries using SET operators is the first column from the first SELECT statement. The other options incorrectly refer to specific data types or columns from the last SELECT, which do not apply to the default sorting behavior.