Bird
0
0

A trigger is not firing after an UPDATE on table Customers. Which fix is most likely needed?

medium📝 Debug Q7 of 15
SQL - Triggers
A trigger is not firing after an UPDATE on table Customers. Which fix is most likely needed?
ARemove the trigger's WHEN condition
BAdd FOR EACH ROW clause to the trigger
CRename the trigger to match the table
DChange trigger timing from AFTER to BEFORE
Step-by-Step Solution
Solution:
  1. Step 1: Understand trigger firing conditions

    Row-level triggers require FOR EACH ROW to run for each updated row.
  2. Step 2: Identify missing element causing no firing

    Without FOR EACH ROW, the trigger may not execute as expected on row updates.
  3. Final Answer:

    Add FOR EACH ROW clause to the trigger -> Option B
  4. Quick Check:

    FOR EACH ROW enables trigger firing per row [OK]
Quick Trick: FOR EACH ROW ensures trigger runs on every row update [OK]
Common Mistakes:
  • Changing timing unnecessarily
  • Renaming triggers incorrectly
  • Removing valid WHEN conditions

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SQL Quizzes