The
INFORMATION_SCHEMA TRIGGERS
Table
1727
INFORMATION_SCHEMA
Name
SHOW
Name
Remarks
ACTION_REFERENCE_NEW_TABLE
NULL
ACTION_REFERENCE_OLD_ROW
OLD
ACTION_REFERENCE_NEW_ROW
NEW
CREATED
NULL
(
0
)
SQL_MODE
MySQL extension
DEFINER
MySQL extension
Notes:
• The
TRIGGERS
table was added in MySQL 5.0.10.
• The
TRIGGER_SCHEMA
and
TRIGGER_NAME
columns contain the name of the database in which the
trigger occurs and the trigger name, respectively.
• The
EVENT_MANIPULATION
column contains one of the values
'INSERT'
,
'DELETE'
, or
'UPDATE'
.
• As noted in
Section 18.3, “Using Triggers”
, every trigger is associated with exactly one table. The
EVENT_OBJECT_SCHEMA
and
EVENT_OBJECT_TABLE
columns contain the database in which this
table occurs, and the table's name.
• The
ACTION_ORDER
column contains the ordinal position of the trigger's action within the list of all
similar triggers on the same table. Currently, this value is always
0
, because it is not possible to have
more than one trigger with the same
EVENT_MANIPULATION
and
ACTION_TIMING
on the same
table.
• The
ACTION_STATEMENT
column contains the statement to be executed when the trigger is
invoked. This is the same as the text displayed in the
Statement
column of the output from
SHOW
TRIGGERS
. Note that this text uses UTF-8 encoding.
• The
ACTION_ORIENTATION
column always contains the value
'ROW'
.
• The
ACTION_TIMING
column contains one of the two values
'BEFORE'
or
'AFTER'
.
• The columns
ACTION_REFERENCE_OLD_ROW
and
ACTION_REFERENCE_NEW_ROW
contain the old
and new column identifiers, respectively. This means that
ACTION_REFERENCE_OLD_ROW
always
contains the value
'OLD'
and
ACTION_REFERENCE_NEW_ROW
always contains the value
'NEW'
.
• The
SQL_MODE
column shows the server SQL mode that was in effect at the time when the trigger
was created (and thus which remains in effect for this trigger whenever it is invoked, regardless of
the current server SQL mode). The possible range of values for this column is the same as that of
the
sql_mode
[495]
system variable. See
Section 5.1.7, “Server SQL Modes”
.
• The
DEFINER
column was added in MySQL 5.0.17.
DEFINER
indicates who defined the trigger.
• The following columns currently always contain
NULL
:
TRIGGER_CATALOG
,
EVENT_OBJECT_CATALOG
,
ACTION_CONDITION
,
ACTION_REFERENCE_OLD_TABLE
,
ACTION_REFERENCE_NEW_TABLE
, and
CREATED
.
Example, using the
ins_sum
trigger defined in
Section 18.3, “Using Triggers”
:
mysql>
SELECT * FROM INFORMATION_SCHEMA.TRIGGERS\G
*************************** 1. row ***************************
TRIGGER_CATALOG: NULL
TRIGGER_SCHEMA: test
TRIGGER_NAME: ins_sum
EVENT_MANIPULATION: INSERT
EVENT_OBJECT_CATALOG: NULL
EVENT_OBJECT_SCHEMA: test
Summary of Contents for 5.0
Page 1: ...MySQL 5 0 Reference Manual ...
Page 18: ...xviii ...
Page 60: ...40 ...
Page 396: ...376 ...
Page 578: ...558 ...
Page 636: ...616 ...
Page 844: ...824 ...
Page 1234: ...1214 ...
Page 1427: ...MySQL Proxy Scripting 1407 ...
Page 1734: ...1714 ...
Page 1752: ...1732 ...
Page 1783: ...Configuring Connector ODBC 1763 ...
Page 1793: ...Connector ODBC Examples 1773 ...
Page 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Page 2850: ...2830 ...
Page 2854: ...2834 ...
Page 2928: ...2908 ...
Page 3000: ...2980 ...
Page 3122: ...3102 ...
Page 3126: ...3106 ...
Page 3174: ...3154 ...
Page 3232: ...3212 ...