Bird
0
0

What is the main purpose of an AFTER trigger in SQL?

easy📝 Conceptual Q11 of 15
SQL - Triggers
What is the main purpose of an AFTER trigger in SQL?
ATo execute actions only after a successful data change like insert, update, or delete
BTo prevent data changes before they happen
CTo rollback transactions automatically
DTo create new tables after data insertion
Step-by-Step Solution
Solution:
  1. Step 1: Understand the timing of AFTER triggers

    AFTER triggers run only after the main data change operation completes successfully.
  2. Step 2: Identify the purpose of AFTER triggers

    They automate tasks like logging or updating related data after changes, ensuring consistency.
  3. Final Answer:

    To execute actions only after a successful data change like insert, update, or delete -> Option A
  4. Quick Check:

    AFTER trigger = post-change action [OK]
Quick Trick: AFTER triggers run only after successful data changes [OK]
Common Mistakes:
  • Confusing BEFORE and AFTER triggers
  • Thinking AFTER triggers run before data changes
  • Assuming AFTER triggers rollback transactions

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SQL Quizzes