Oracle Database SQL — Question 154
Which three are true about subqueries? (Choose three.)
Answer options
- A. A subquery cannot be used in the select list.
- B. < ANY returns true if the argument is less than the highest value returned by the subquery.
- C. < ANY returns true if the argument is less than the lowest value returned by the subquery.
- D. A subquery can be used in a HAVING clause.
- E. A subquery cannot be used in a FROM clause.
- F. A subquery can be used in a WHERE clause.
- G. = ANY can only evaluate the argument against a subquery if it returns two or more values.
Correct answer: B, D, F
Explanation
The correct answers are B, D, and F. Option B is true because < ANY evaluates to true when the argument is less than the highest subquery result. Option D is correct as subqueries can indeed be employed in HAVING clauses. Option F is valid since subqueries are commonly used in WHERE clauses. Options A and E are incorrect because subqueries can be used in the select list and FROM clause, respectively. Option C misinterprets the functionality of < ANY, and G is misleading as = ANY can evaluate against a single value.