Note
This view is available starting with V3.2.3.
Overview
The information_schema.TRIGGERS view displays information about triggers.
Columns
Field Name |
Type |
Whether can be NULL |
Description |
|---|---|---|---|
| TRIGGER_CATALOG | varchar(512) | NO | The name of the directory to which the trigger belongs. This value is always 'def'. |
| TRIGGER_SCHEMA | varchar(64) | NO | The name of the schema (database) to which the trigger belongs. |
| TRIGGER_NAME | varchar(64) | NO | The name of the trigger. |
| EVENT_MANIPULATION | varchar(6) | NO | Trigger event. This is the type of operation that activates the trigger on the associated table. The value can be INSERT (a row was inserted), DELETE (a row was deleted), or UPDATE (a row was modified). |
| EVENT_OBJECT_CATALOG | varchar(512) | NO | The directory where the table associated with this trigger is located. This value is always 'def'. |
| EVENT_OBJECT_SCHEMA | varchar(64) | NO | The schema (database) where the table associated with this trigger is located. |
| EVENT_OBJECT_TABLE | varchar(64) | NO | The name of the table associated with this trigger. |
| ACTION_ORDER | bigint(20) | NO | In instances with the sameEVENT_MANIPULATIONandACTION_TIMINGThe order and position of trigger operations in the list of triggers on the same table. |
| ACTION_CONDITION | longtext | NO | This value is always NULL. |
| ACTION_STATEMENT | longtext | NO | The statements executed when the trigger is activated. |
| ACTION_ORIENTATION | varchar(9) | NO | This value is always ROW. |
| ACTION_TIMING | varchar(6) | NO | Whether the trigger is activated before or after the triggering event. The value can be BEFORE or AFTER. |
| ACTION_REFERENCE_OLD_TABLE | varchar(64) | NO | This value is always NULL. |
| ACTION_REFERENCE_NEW_TABLE | varchar(64) | NO | This value is always NULL. |
| ACTION_REFERENCE_OLD_ROW | varchar(3) | NO | The identifier of the old column. This value is always OLD. |
| ACTION_REFERENCE_NEW_ROW | varchar(3) | NO | The identifier of the new column, whose value is always NEW. |
| CREATED | datetime(2) | YES | Date and time when the trigger was created |
| SQL_MODE | text | NO | SQL mode effective when creating a trigger |
| DEFINER | varchar(93) | YES | DEFINERThe account specified in the clause (usually the user who creates the trigger) is in the format of'user_name'@'host_name' |
| CHARACTER_SET_CLIENT | varchar(32) | NO | When creating a triggercharacter_set_clientThe value of the system variable in the current session. |
| COLLATION_CONNECTION | varchar(32) | NO | When creating a triggercollation_connectionThe value of the system variable in the current session. |
| DATABASE_COLLATION | varchar(32) | NO | The collation of the database associated with the trigger. |
| ---------------------------- | -------------- | ------ | ------ |
Sample query
Query the details of table t1.
SELECT * FROM information_schema.TRIGGERS;
