ExamVeda
Login
Home
This question belongs to MySQL MySQL Miscellaneous
MySQL Miscellaneous
?

What is defined to execute when the table is modified only?

Answer & Solution
Correct Answer: Option C
Imagine you have a table of customers in your database. You want to automatically update the customer's "last order date" whenever they place a new order. How can you achieve this?

The answer is Triggers.

Triggers are special database objects that automatically execute a set of predefined commands when a specific event happens in a table. In this case, the event would be the modification of the customer table (like adding a new order).

Here's why the other options are incorrect:

* Stored functions and stored procedures are blocks of code that can be called and executed on demand. They don't automatically execute based on table modifications.
* Events are scheduled actions that happen at specific times or intervals. They are not tied to specific table modifications.

So the answer is Option C: Triggers.
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.