Vidyalelo
MySQL · Q997

MySQL

Programming · MySQL · question 997

Q997

What is abc in the following MySQL statement? CREATE TRIGGER abc (...) (...) ON def FOR EACH ROW ghi;

A.
trigger name
Answer
B.
table name
C.
trigger statement
D.
update statement

Answer: Option A

Solution

Answer: Option A
Solution:
This question is about understanding the parts of a MySQL trigger creation statement.

The code snippet is:
CREATE TRIGGER abc (...) (...) ON def FOR EACH ROW ghi;

Let's break it down:

* CREATE TRIGGER: This tells MySQL you're creating a trigger.
* abc: This is the name you're giving to the trigger.
* (...) (...) ON def: These parts define what happens when the trigger is activated, and on which table (def) it operates.
* FOR EACH ROW: This means the trigger will run for each row affected by an event on the table.
* ghi: This is the code that will be executed when the trigger is activated.

Therefore, the answer is Option A: trigger name.

abc is the name of the trigger you're creating.