Multiple choice

In which clauses of a SELECT statement can substitution variables be used?

  1. The SELECT and FROM clauses, but not the WHERE clause

  2. The SELECT, FROM, WHERE, and GROUP BY clauses, but not the ORDER BY clause

  3. The SELECT, WHERE, GROUP BY, and ORDER BY clauses, but not the FROM clause

  4. The SELECT and FROM clauses, but not the WHERE clause

  5. The SELECT, FROM, WHERE, GROUP BY, ORDER BY, and HAVING clauses

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

Substitution variables can be used in all clauses of a SELECT statement: SELECT, FROM, WHERE, GROUP BY, ORDER BY, and HAVING. They are replaced before statement execution. Options A-D incorrectly restrict which clauses can use substitution variables.