Nó có thể được thực hiện với sự trợ giúp của câu lệnh sau -
mysql> select * from information_schema.triggers trong đó -> information_schema.triggers.trigger_schema như '% query%' \ G *********************** **** 1. hàng *************************** TRIGGER_CATALOG:def TRIGGER_SCHEMA:truy vấn TRIGGER_NAME:trigger_before_delete_sample EVENT_MANIPULATION:DELETE EVENT_OBJECT_CATALOG:def EVENT_OBJECT_SCHEMA :query EVENT_OBJECT_TABLE:sample ACTION_ORDER:1 ACTION_CONDITION:NULL ACTION_STATEMENT:BEGINSET @count =if (@count IS NULL, 1, (@ count + 1)); CHÈN VÀO giá trị sample_rowaffected (@count); HẾT ACTION_ORIENTATION:ROW ACTION_T ACTION_REFERENCE_OLD_TABLE:NULL ACTION_REFERENCE_NEW_TABLE:NULL ACTION_REFERENCE_OLD_ROW:OLD ACTION_REFERENCE_NEW_ROW:MỚI TẠO:2017-11-21 12:31:58.70 SQL_MODE:ONLY_FULL_GROUP_BY, STRICT_FULL_GROUP_BY, STRATE_TRANSERO_TRERO_DERO SION_BY_ZERO, NO_AUTO_CREATE_USER, NO_ENGINE_SUBSTITUTION DEFINER:root @ localhost CHARACTER_SET_CLIENT:cp850 COLLATION_CONNECTION:cp850_general_ci DATABASE_COLLATION:latin1_swedish_ci *************************** 2. hàng *************************** ************************** TRIGGER_CATALOG:def TRIGGER_SCHEMA:truy vấn TRIGGER_NAME:before_inser_studentage EVENT_MANIPULATION:INSERT EVENT_OBJECT_CATALOG:def EVENT_OBJECT_SCHEMA:query EVENT_OBJECT_TABLE:student_age ACTION_ORDER:1 ACTION_CONDITION:NULL ACTION_STATEMENT:NẾU NEW.age <0 THEN SET NEW.age =0; KẾT THÚC NẾU ACTION_ORIENTATION:ROW ACTION_TIMING:BEFOREACTION_REFERENCE_OLD_TABLE:NULLACTION_REFERENCE_NEW_TABLE:NULL ACTION_REFERENCE_OLD_ROW1 ngày 11 tháng 11 năm 2017:15-11:TUỔI MỚI:15-11 :ONLY_FULL_GROUP_BY, STRICT_TRANS_TABLES, NO_ZERO_IN_DATE, NO_ZERO_ DATE, ERROR_FOR_DIVISION_BY_ZERO, NO_AUTO_CREATE_USER, NO_ENGINE_SUBSTITUTION DEFINER:root @ localhost CHARACTER_SET_CLIENT:cp850 COLLATION_CONNECTION:cp850_general_ci DATABASE_COLs hàng 0,03 giây trong setish giới hạn:l