SHOW TRIGGERSThis MySQL statement displays a list of triggers on the server.SyntaxSHOW TRIGGERS STATUS [FROM database] [LIKE 'pattern'|WHERE expression] ExplanationThis MySQL statement displays a list of triggers on the MySQL server. The database to which triggers are related may be given in the FROM clause; the default is the current database. The LIKE or WHERE clauses can be used to list triggers based on a particular naming pattern. The LIKE clause includes the name of the table with which the trigger is associated or a pattern for the table name that includes wildcards (%). With the WHERE clause, you can use the names of fields in the results to create an expression that sets a condition determining the results returned. ExamplesBelow is an example of this MySQL statement: SHOW TRIGGERS LIKE 'students' G
*************************** 1. row ***************************
Trigger: students_deletion
Event: DELETE
Table: students
Statement: BEGIN
INSERT INTO students_deleted
(student_id, name_first, name_last)
VALUES(OLD.student_id, OLD.name_first, OLD.name_last);
END
Timing: BEFORE
Created: NULL
sql_mode:
Definer: root@localhost
See the MySQL statement, CREATE TRIGGER of our MySQL documentation for more information on triggers and how the trigger shown in the example above was created. |

