Multiple choice

Which of the following constructs can be used to return data based on an unknown condition?

  1. An ORDER BY clause

  2. An GROUP BY clause

  3. A WHERE clause with an OR condition

  4. A Subquery

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Subqueries allow dynamic query execution where the exact condition may not be known at design time - the inner query's results determine the outer query's behavior. ORDER BY and GROUP BY are for sorting and aggregation, not conditional logic. WHERE with OR only handles known conditions.