<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="show-triggers">
      </a>
      15.7.7.40 SHOW TRIGGERS Statement
     </h4>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045169091600">
  </a>
  <a class="indexterm" name="idm46045169090528">
  </a>
  <a class="indexterm" name="idm46045169089456">
  </a>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa46539047"><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 keyword">SHOW</span> <span class="token keyword">TRIGGERS</span>
    <span class="token punctuation">[</span>{<span class="token keyword">FROM</span> <span class="token operator">|</span> <span class="token keyword">IN</span>} <em class="replaceable">db_name</em><span class="token punctuation">]</span>
    <span class="token punctuation">[</span><span class="token operator">LIKE</span> <span class="token string">'<em class="replaceable">pattern</em>'</span> <span class="token operator">|</span> <span class="token keyword">WHERE</span> <em class="replaceable">expr</em><span class="token punctuation">]</span></code></pre>
  </div>
  <p>
   <a class="link" href="show-triggers.html" title="15.7.7.40 SHOW TRIGGERS Statement">
    <code class="literal">
     SHOW TRIGGERS
    </code>
   </a>
   lists the triggers
        currently defined for tables in a database (the default database
        unless a
   <code class="literal">
    FROM
   </code>
   clause is given). This
        statement returns results only for databases and tables for
        which you have the
   <a class="link" href="privileges-provided.html#priv_trigger">
    <code class="literal">
     TRIGGER
    </code>
   </a>
   privilege. The
   <a class="link" href="string-comparison-functions.html#operator_like">
    <code class="literal">
     LIKE
    </code>
   </a>
   clause, if
        present, indicates which table names (not trigger names) to
        match and causes the statement to display triggers for those
        tables. The
   <code class="literal">
    WHERE
   </code>
   clause can be given to
        select rows using more general conditions, as discussed in
   <a class="xref" href="extended-show.html" title="28.8 Extensions to SHOW Statements">
    Section 28.8, “Extensions to SHOW Statements”
   </a>
   .
  </p>
  <p>
   For 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>
   , the output of
   <a class="link" href="show-triggers.html" title="15.7.7.40 SHOW TRIGGERS Statement">
    <code class="literal">
     SHOW TRIGGERS
    </code>
   </a>
   is as shown here:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa41795362"><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">SHOW</span> <span class="token keyword">TRIGGERS</span> <span class="token operator">LIKE</span> <span class="token string">'acc%'</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<span class="token punctuation">:</span> ins_sum
               Event<span class="token punctuation">:</span> INSERT
               Table<span class="token punctuation">:</span> account
           Statement<span class="token punctuation">:</span> SET @sum = @sum + NEW.amount
              Timing<span class="token punctuation">:</span> BEFORE
             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>
   <a class="link" href="show-triggers.html" title="15.7.7.40 SHOW TRIGGERS Statement">
    <code class="literal">
     SHOW TRIGGERS
    </code>
   </a>
   output has these
        columns:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <code class="literal">
       Trigger
      </code>
     </p>
     <p>
      The name of the trigger.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       Event
      </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">
       Table
      </code>
     </p>
     <p>
      The table for which the trigger is defined.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       Statement
      </code>
     </p>
     <p>
      The trigger body; that is, the statement executed when the
            trigger activates.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       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">
       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 of 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>
  <p>
   Trigger information is also available from the
   <code class="literal">
    INFORMATION_SCHEMA
   </code>
   <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. See
   <a class="xref" href="information-schema-triggers-table.html" title="28.3.44 The INFORMATION_SCHEMA TRIGGERS Table">
    Section 28.3.44, “The INFORMATION_SCHEMA TRIGGERS Table”
   </a>
   .
  </p>
 </div>
 <br/>
</div>
