content_image/683564.jpg
<img src='content_image/683564.jpg'>

A.5.1. Where can I find the documentation for MySQL 8.0 triggers? 

A.5.2. Is there a discussion forum for MySQL Triggers? 

A.5.3. Does MySQL 8.0 have statement-level or row-level triggers? 

See Section 25.3, “Using Triggers” . 

Yes. It is available at https://forums.mysql.com/list.php?99. 

In MySQL 8.0, all triggers are FOR EACH ROW ; that is, the trigger is activated for each row that is inserted, updated, or deleted. MySQL 8.0 does not support triggers using FOR EACH STATEMENT . 

A.5.4. Are there any default triggers? 

Not explicitly. MySQL does have specific special behavior for some TIMESTAMP  columns, as well as for columns which are defined using AUTO_INCREMENT . 

A.5.5. How are triggers managed in MySQL? 

In MySQL 8.0, triggers can be created using the CREATE TRIGGER  statement, and dropped using DROP TRIGGER . See Section 13.1.22, “CREATE TRIGGER Statement” , and Section 13.1.34, “DROP TRIGGER Statement” , for more about these statements. 

Information about triggers can be obtained by querying the INFORMATION_SCHEMA.TRIGGERS table. See Section 26.3.45, “The INFORMATION_SCHEMA TRIGGERS Table” . 

A.5.6. Is there a way to view all triggers in a given database? 

Yes. You can obtain a listing of all triggers defined on database dbname  using a query on the INFORMATION_SCHEMA.TRIGGERS  table such as the one shown here: 

SELECT TRIGGER_NAME, EVENT_MANIPULATION, EVENT_OBJECT_TABLE, ACTION_STATEMENT FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_SCHEMA=’ dbname ’; 

For more information about this table, see Section 26.3.45, “The INFORMATION_SCHEMA TRIGGERS Table” . 

You can also use the SHOW TRIGGERS  statement, which is specific to MySQL. See Section 13.7.7.40, “SHOW TRIGGERS Statement” . 

A.5.7. Where are triggers stored? 

Triggers are stored in the mysql.triggers  system table, which is part of the data dictionary. 

A.5.8. Can a trigger call a stored procedure? 

