Which of these is defined to execute when the table is modified only?
A. Stored functions
B. Stored procedures
C. Triggers
D. Events
Answer: Option C
Solution (By Examveda Team)
This question asks about a special type of database object that runs automatically whenever a table is changed. Think of it like a secret agent that watches over a table and jumps into action whenever someone adds, removes, or changes data.Let's look at the options:
Option A: Stored functions - These are like little programs that perform specific tasks but don't react to changes in tables.
Option B: Stored procedures - Similar to functions, they execute on demand, not when tables change.
Option C: Triggers - This is the right answer! Triggers are designed to run automatically in response to changes in a table. They can be set to run after an insert, update, or delete operation.
Option D: Events - Events are scheduled actions that happen at specific times, not necessarily tied to changes in tables.
Therefore, the correct answer is Option C: Triggers.

Join The Discussion