Multiple choice

In this SQL statement, which of the following lines will produce an error?

  1. CREATE OR REPLACE TRIGGER check_age

  2. BEFORE INSERT OR UPDATE ON employee FOR EACH ROW

  3. IS

  4. years_old NUMBER;

  5. BEGIN

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

In the trigger code shown, line C ("IS") is on its own line before the variable declarations. This is incorrect syntax because the declaration section cannot begin immediately after "IS" without proper context. The correct order should be the trigger header (lines A-B), then "IS" on the same line or followed by declarations, but not as a standalone line. Lines A and B correctly define the trigger. Line D (variable declaration) and line E (BEGIN) are syntactically correct in their positions.