<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="show-create-trigger">
      </a>
      15.7.7.12 SHOW CREATE TRIGGER Statement
     </h4>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045170832016">
  </a>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting one-line language-sql"><div class="docs-select-all right" id="sa54064500"><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">CREATE</span> <span class="token keyword">TRIGGER</span> <em class="replaceable">trigger_name</em></code></pre>
  </div>
  <p>
   This statement shows the
   <a class="link" href="create-trigger.html" title="15.1.22 CREATE TRIGGER Statement">
    <code class="literal">
     CREATE
        TRIGGER
    </code>
   </a>
   statement that creates the named trigger. This
        statement requires the
   <a class="link" href="privileges-provided.html#priv_trigger">
    <code class="literal">
     TRIGGER
    </code>
   </a>
   privilege for the table associated with the trigger.
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa46946731"><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">CREATE</span> <span class="token keyword">TRIGGER</span> ins_sum\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
              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
SQL Original Statement<span class="token punctuation">:</span> CREATE DEFINER=`me`@`localhost` TRIGGER `ins_sum`
                        BEFORE INSERT ON `account`
                        FOR EACH ROW SET @sum = @sum + NEW.amount
  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
               Created<span class="token punctuation">:</span> 2018-08-08 10<span class="token punctuation">:</span>10<span class="token punctuation">:</span>12.61</span></code></pre>
  </div>
  <p>
   <a class="link" href="show-create-trigger.html" title="15.7.7.12 SHOW CREATE TRIGGER Statement">
    <code class="literal">
     SHOW CREATE TRIGGER
    </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>
      : The trigger name.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       sql_mode
      </code>
      : The SQL mode in effect when the
            trigger executes.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       SQL Original Statement
      </code>
      : The
      <a class="link" href="create-trigger.html" title="15.1.22 CREATE TRIGGER Statement">
       <code class="literal">
        CREATE TRIGGER
       </code>
      </a>
      statement that
            defines the trigger.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       character_set_client
      </code>
      : 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>
      : 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>
      : The collation of the
            database with which the trigger is associated.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       Created
      </code>
      : 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>
   </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>
