What 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)
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.
Related Questions on MySQL Miscellaneous
How is communication established with MySQL?
A. SQL
B. Network calls
C. A programming language like C++
D. APIs
Which type of database management system is MySQL?
A. Object-oriented
B. Hierarchical
C. Relational
D. Network

Join The Discussion