Bird
0
0

What is the main purpose of an INSERT trigger in a database?

easy📝 Conceptual Q11 of 15
SQL - Triggers
What is the main purpose of an INSERT trigger in a database?
ATo update existing rows in a table
BTo automatically run code when a new row is added to a table
CTo delete rows from a table
DTo create a new table
Step-by-Step Solution
Solution:
  1. Step 1: Understand what triggers do

    Triggers are special procedures that run automatically in response to certain events in the database.
  2. Step 2: Focus on INSERT triggers

    An INSERT trigger specifically runs when a new row is added to a table.
  3. Final Answer:

    To automatically run code when a new row is added to a table -> Option B
  4. Quick Check:

    INSERT trigger = runs on new row insert [OK]
Quick Trick: INSERT triggers run on new rows added [OK]
Common Mistakes:
  • Confusing INSERT triggers with UPDATE or DELETE triggers
  • Thinking triggers create or drop tables
  • Believing triggers run manually

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SQL Quizzes