<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h3 class="title">
      <a name="information-schema-triggers-table">
      </a>
      28.3.44 The INFORMATION_SCHEMA TRIGGERS Table
     </h3>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045078178480">
  </a>
  <p>
   The
   <a class="link" href="information-schema-triggers-table.html" title="28.3.44 The INFORMATION_SCHEMA TRIGGERS Table">
    <code class="literal">
     TRIGGERS
    </code>
   </a>
   table provides
      information about triggers. To see information about a table's
      triggers, you must have the
   <a class="link" href="privileges-provided.html#priv_trigger">
    <code class="literal">
     TRIGGER
    </code>
   </a>
   privilege for the table.
  </p>
  <p>
   The
   <a class="link" href="information-schema-triggers-table.html" title="28.3.44 The INFORMATION_SCHEMA TRIGGERS Table">
    <code class="literal">
     TRIGGERS
    </code>
   </a>
   table has these columns:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <code class="literal">
       TRIGGER_CATALOG
      </code>
     </p>
     <p>
      The name of the catalog to which the trigger belongs. This
          value is always
      <code class="literal">
       def
      </code>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       TRIGGER_SCHEMA
      </code>
     </p>
     <p>
      The name of the schema (database) to which the trigger
          belongs.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       TRIGGER_NAME
      </code>
     </p>
     <p>
      The name of the trigger.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       EVENT_MANIPULATION
      </code>
     </p>
     <p>
      The trigger event. This is the type of operation on the
          associated table for which the trigger activates. The value is
      <code class="literal">
       INSERT
      </code>
      (a row was inserted),
      <code class="literal">
       DELETE
      </code>
      (a row was deleted), or
      <code class="literal">
       UPDATE
      </code>
      (a row was modified).
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       EVENT_OBJECT_CATALOG
      </code>
      ,
      <code class="literal">
       EVENT_OBJECT_SCHEMA
      </code>
      , and
      <code class="literal">
       EVENT_OBJECT_TABLE
      </code>
     </p>
     <p>
      As noted in
      <a class="xref" href="triggers.html" title="27.3 Using Triggers">
       Section 27.3, “Using Triggers”
      </a>
      , every trigger is
          associated with exactly one table. These columns indicate the
          catalog and schema (database) in which this table occurs, and
          the table name, respectively. The
      <code class="literal">
       EVENT_OBJECT_CATALOG
      </code>
      value is always
      <code class="literal">
       def
      </code>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       ACTION_ORDER
      </code>
     </p>
     <p>
      The ordinal position of the trigger's action within the list
          of triggers on the same table with the same
      <code class="literal">
       EVENT_MANIPULATION
      </code>
      and
      <code class="literal">
       ACTION_TIMING
      </code>
      values.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       ACTION_CONDITION
      </code>
     </p>
     <p>
      This value is always
      <code class="literal">
       NULL
      </code>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       ACTION_STATEMENT
      </code>
     </p>
     <p>
      The trigger body; that is, the statement executed when the
          trigger activates. This text uses UTF-8 encoding.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       ACTION_ORIENTATION
      </code>
     </p>
     <p>
      This value is always
      <code class="literal">
       ROW
      </code>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       ACTION_TIMING
      </code>
     </p>
     <p>
      Whether the trigger activates before or after the triggering
          event. The value is
      <code class="literal">
       BEFORE
      </code>
      or
      <code class="literal">
       AFTER
      </code>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       ACTION_REFERENCE_OLD_TABLE
      </code>
     </p>
     <p>
      This value is always
      <code class="literal">
       NULL
      </code>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       ACTION_REFERENCE_NEW_TABLE
      </code>
     </p>
     <p>
      This value is always
      <code class="literal">
       NULL
      </code>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       ACTION_REFERENCE_OLD_ROW
      </code>
      and
      <code class="literal">
       ACTION_REFERENCE_NEW_ROW
      </code>
     </p>
     <p>
      The old and new column identifiers, respectively. The
      <code class="literal">
       ACTION_REFERENCE_OLD_ROW
      </code>
      value is always
      <code class="literal">
       OLD
      </code>
      and the
      <code class="literal">
       ACTION_REFERENCE_NEW_ROW
      </code>
      value is always
      <code class="literal">
       NEW
      </code>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       CREATED
      </code>
     </p>
     <p>
      The date and time when the trigger was created. This is a
      <code class="literal">
       TIMESTAMP(2)
      </code>
      value (with a fractional part
          in hundredths of seconds) for triggers.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       SQL_MODE
      </code>
     </p>
     <p>
      The SQL mode in effect when the trigger was created, and under
          which the trigger executes. For the permitted values, see
      <a class="xref" href="sql-mode.html" title="7.1.11 Server SQL Modes">
       Section 7.1.11, “Server SQL Modes”
      </a>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       DEFINER
      </code>
     </p>
     <p>
      The account named in the
      <code class="literal">
       DEFINER
      </code>
      clause
          (often the user who created the trigger), in
      <code class="literal">
       '
       <em class="replaceable">
        <code>
         user_name
        </code>
       </em>
       '@'
       <em class="replaceable">
        <code>
         host_name
        </code>
       </em>
       '
      </code>
      format.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       CHARACTER_SET_CLIENT
      </code>
     </p>
     <p>
      The session value of the
      <a class="link" href="server-system-variables.html#sysvar_character_set_client">
       <code class="literal">
        character_set_client
       </code>
      </a>
      system
          variable when the trigger was created.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       COLLATION_CONNECTION
      </code>
     </p>
     <p>
      The session value of the
      <a class="link" href="server-system-variables.html#sysvar_collation_connection">
       <code class="literal">
        collation_connection
       </code>
      </a>
      system
          variable when the trigger was created.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       DATABASE_COLLATION
      </code>
     </p>
     <p>
      The collation of the database with which the trigger is
          associated.
     </p>
    </li>
   </ul>
  </div>
  <h4>
   <a name="idm46045078112656">
   </a>
   Example
  </h4>
  <p>
   The following example uses the
   <code class="literal">
    ins_sum
   </code>
   trigger
      defined in
   <a class="xref" href="triggers.html" title="27.3 Using Triggers">
    Section 27.3, “Using Triggers”
   </a>
   :
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa30941126"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql"><span class="token prompt">mysql&gt;</span> <span class="token keyword">SELECT</span> <span class="token operator">*</span> <span class="token keyword">FROM</span> INFORMATION_SCHEMA<span class="token punctuation">.</span><span class="token keyword">TRIGGERS</span>
       <span class="token keyword">WHERE</span> TRIGGER_SCHEMA<span class="token operator">=</span><span class="token string">'test'</span> <span class="token operator">AND</span> TRIGGER_NAME<span class="token operator">=</span><span class="token string">'ins_sum'</span>\G
<span class="token output"><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span> 1. row <span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span><span class="token punctuation">*</span>
           TRIGGER_CATALOG<span class="token punctuation">:</span> def
            TRIGGER_SCHEMA<span class="token punctuation">:</span> test
              TRIGGER_NAME<span class="token punctuation">:</span> ins_sum
        EVENT_MANIPULATION<span class="token punctuation">:</span> INSERT
      EVENT_OBJECT_CATALOG<span class="token punctuation">:</span> def
       EVENT_OBJECT_SCHEMA<span class="token punctuation">:</span> test
        EVENT_OBJECT_TABLE<span class="token punctuation">:</span> account
              ACTION_ORDER<span class="token punctuation">:</span> 1
          ACTION_CONDITION<span class="token punctuation">:</span> NULL
          ACTION_STATEMENT<span class="token punctuation">:</span> SET @sum = @sum + NEW.amount
        ACTION_ORIENTATION<span class="token punctuation">:</span> ROW
             ACTION_TIMING<span class="token punctuation">:</span> BEFORE
ACTION_REFERENCE_OLD_TABLE<span class="token punctuation">:</span> NULL
ACTION_REFERENCE_NEW_TABLE<span class="token punctuation">:</span> NULL
  ACTION_REFERENCE_OLD_ROW<span class="token punctuation">:</span> OLD
  ACTION_REFERENCE_NEW_ROW<span class="token punctuation">:</span> NEW
                   CREATED<span class="token punctuation">:</span> 2018-08-08 10<span class="token punctuation">:</span>10<span class="token punctuation">:</span>12.61
                  SQL_MODE<span class="token punctuation">:</span> ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,
                            NO_ZERO_IN_DATE,NO_ZERO_DATE,
                            ERROR_FOR_DIVISION_BY_ZERO,
                            NO_ENGINE_SUBSTITUTION
                   DEFINER<span class="token punctuation">:</span> me@localhost
      CHARACTER_SET_CLIENT<span class="token punctuation">:</span> utf8mb4
      COLLATION_CONNECTION<span class="token punctuation">:</span> utf8mb4_0900_ai_ci
        DATABASE_COLLATION<span class="token punctuation">:</span> utf8mb4_0900_ai_ci</span></code></pre>
  </div>
  <p>
   Trigger information is also available from the
   <a class="link" href="show-triggers.html" title="15.7.7.40 SHOW TRIGGERS Statement">
    <code class="literal">
     SHOW TRIGGERS
    </code>
   </a>
   statement. See
   <a class="xref" href="show-triggers.html" title="15.7.7.40 SHOW TRIGGERS Statement">
    Section 15.7.7.40, “SHOW TRIGGERS Statement”
   </a>
   .
  </p>
 </div>
 <br/>
</div>
