How do you list all triggers in a MySQL database? How do you list all triggers in a MySQL database? mysql mysql

How do you list all triggers in a MySQL database?


The command for listing all triggers is:

show triggers;

or you can access the INFORMATION_SCHEMA table directly by:

select trigger_schema, trigger_name, action_statementfrom information_schema.triggers


I hope following code will give you more information.

select * from information_schema.triggers where information_schema.triggers.trigger_schema like '%your_db_name%'

This will give you total 22 Columns in MySQL version: 5.5.27 and Above

TRIGGER_CATALOG TRIGGER_SCHEMATRIGGER_NAMEEVENT_MANIPULATIONEVENT_OBJECT_CATALOGEVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLEACTION_ORDERACTION_CONDITIONACTION_STATEMENTACTION_ORIENTATIONACTION_TIMINGACTION_REFERENCE_OLD_TABLEACTION_REFERENCE_NEW_TABLEACTION_REFERENCE_OLD_ROWACTION_REFERENCE_NEW_ROWCREATED SQL_MODEDEFINER CHARACTER_SET_CLIENTCOLLATION_CONNECTIONDATABASE_COLLATION


You can use below to find a particular trigger definition.

SHOW TRIGGERS LIKE '%trigger_name%'\G

or the below to show all the triggers in the database. It will work for MySQL 5.0 and above.

SHOW TRIGGERS\G