<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h3 class="title">
      <a name="show">
      </a>
      15.7.7 SHOW Statements
     </h3>
    </div>
   </div>
  </div>
  <div class="toc">
   <dl class="toc">
    <dt>
     <span class="section">
      <a href="show-binary-log-status.html">
       15.7.7.1 SHOW BINARY LOG STATUS Statement
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="show-binary-logs.html">
       15.7.7.2 SHOW BINARY LOGS Statement
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="show-binlog-events.html">
       15.7.7.3 SHOW BINLOG EVENTS Statement
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="show-character-set.html">
       15.7.7.4 SHOW CHARACTER SET Statement
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="show-collation.html">
       15.7.7.5 SHOW COLLATION Statement
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="show-columns.html">
       15.7.7.6 SHOW COLUMNS Statement
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="show-create-database.html">
       15.7.7.7 SHOW CREATE DATABASE Statement
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="show-create-event.html">
       15.7.7.8 SHOW CREATE EVENT Statement
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="show-create-function.html">
       15.7.7.9 SHOW CREATE FUNCTION Statement
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="show-create-procedure.html">
       15.7.7.10 SHOW CREATE PROCEDURE Statement
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="show-create-table.html">
       15.7.7.11 SHOW CREATE TABLE Statement
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="show-create-trigger.html">
       15.7.7.12 SHOW CREATE TRIGGER Statement
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="show-create-user.html">
       15.7.7.13 SHOW CREATE USER Statement
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="show-create-view.html">
       15.7.7.14 SHOW CREATE VIEW Statement
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="show-databases.html">
       15.7.7.15 SHOW DATABASES Statement
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="show-engine.html">
       15.7.7.16 SHOW ENGINE Statement
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="show-engines.html">
       15.7.7.17 SHOW ENGINES Statement
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="show-errors.html">
       15.7.7.18 SHOW ERRORS Statement
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="show-events.html">
       15.7.7.19 SHOW EVENTS Statement
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="show-function-code.html">
       15.7.7.20 SHOW FUNCTION CODE Statement
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="show-function-status.html">
       15.7.7.21 SHOW FUNCTION STATUS Statement
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="show-grants.html">
       15.7.7.22 SHOW GRANTS Statement
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="show-index.html">
       15.7.7.23 SHOW INDEX Statement
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="show-master-status.html">
       15.7.7.24 SHOW MASTER STATUS Statement (no longer supported)
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="show-open-tables.html">
       15.7.7.25 SHOW OPEN TABLES Statement
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="show-parse-tree.html">
       15.7.7.26 SHOW PARSE_TREE Statement
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="show-plugins.html">
       15.7.7.27 SHOW PLUGINS Statement
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="show-privileges.html">
       15.7.7.28 SHOW PRIVILEGES Statement
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="show-procedure-code.html">
       15.7.7.29 SHOW PROCEDURE CODE Statement
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="show-procedure-status.html">
       15.7.7.30 SHOW PROCEDURE STATUS Statement
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="show-processlist.html">
       15.7.7.31 SHOW PROCESSLIST Statement
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="show-profile.html">
       15.7.7.32 SHOW PROFILE Statement
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="show-profiles.html">
       15.7.7.33 SHOW PROFILES Statement
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="show-relaylog-events.html">
       15.7.7.34 SHOW RELAYLOG EVENTS Statement
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="show-replica-status.html">
       15.7.7.35 SHOW REPLICA STATUS Statement
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="show-replicas.html">
       15.7.7.36 SHOW REPLICAS Statement
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="show-status.html">
       15.7.7.37 SHOW STATUS Statement
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="show-table-status.html">
       15.7.7.38 SHOW TABLE STATUS Statement
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="show-tables.html">
       15.7.7.39 SHOW TABLES Statement
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="show-triggers.html">
       15.7.7.40 SHOW TRIGGERS Statement
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="show-variables.html">
       15.7.7.41 SHOW VARIABLES Statement
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="show-warnings.html">
       15.7.7.42 SHOW WARNINGS Statement
      </a>
     </span>
    </dt>
   </dl>
  </div>
  <a class="indexterm" name="idm46045171314272">
  </a>
  <a class="indexterm" name="idm46045171311456">
  </a>
  <a class="indexterm" name="idm46045171309968">
  </a>
  <a class="indexterm" name="idm46045171308880">
  </a>
  <a class="indexterm" name="idm46045171307792">
  </a>
  <a class="indexterm" name="idm46045171306704">
  </a>
  <a class="indexterm" name="idm46045171305616">
  </a>
  <a class="indexterm" name="idm46045171304528">
  </a>
  <a class="indexterm" name="idm46045171303456">
  </a>
  <a class="indexterm" name="idm46045171302368">
  </a>
  <a class="indexterm" name="idm46045171301280">
  </a>
  <a class="indexterm" name="idm46045171300192">
  </a>
  <a class="indexterm" name="idm46045171299104">
  </a>
  <a class="indexterm" name="idm46045171298016">
  </a>
  <a class="indexterm" name="idm46045171296928">
  </a>
  <a class="indexterm" name="idm46045171295840">
  </a>
  <a class="indexterm" name="idm46045171294752">
  </a>
  <a class="indexterm" name="idm46045171293664">
  </a>
  <a class="indexterm" name="idm46045171292592">
  </a>
  <a class="indexterm" name="idm46045171291520">
  </a>
  <a class="indexterm" name="idm46045171290448">
  </a>
  <a class="indexterm" name="idm46045171289376">
  </a>
  <a class="indexterm" name="idm46045171288304">
  </a>
  <a class="indexterm" name="idm46045171287216">
  </a>
  <a class="indexterm" name="idm46045171286128">
  </a>
  <a class="indexterm" name="idm46045171285056">
  </a>
  <a class="indexterm" name="idm46045171283984">
  </a>
  <a class="indexterm" name="idm46045171282912">
  </a>
  <a class="indexterm" name="idm46045171281824">
  </a>
  <a class="indexterm" name="idm46045171280736">
  </a>
  <a class="indexterm" name="idm46045171279664">
  </a>
  <a class="indexterm" name="idm46045171278576">
  </a>
  <a class="indexterm" name="idm46045171277488">
  </a>
  <a class="indexterm" name="idm46045171276400">
  </a>
  <a class="indexterm" name="idm46045171275312">
  </a>
  <a class="indexterm" name="idm46045171274240">
  </a>
  <a class="indexterm" name="idm46045171273168">
  </a>
  <a class="indexterm" name="idm46045171272080">
  </a>
  <a class="indexterm" name="idm46045171271008">
  </a>
  <a class="indexterm" name="idm46045171269920">
  </a>
  <a class="indexterm" name="idm46045171268848">
  </a>
  <a class="indexterm" name="idm46045171267776">
  </a>
  <a class="indexterm" name="idm46045171266688">
  </a>
  <a class="indexterm" name="idm46045171265616">
  </a>
  <a class="indexterm" name="idm46045171264528">
  </a>
  <p>
   <a class="link" href="show.html" title="15.7.7 SHOW Statements">
    <code class="literal">
     SHOW
    </code>
   </a>
   has many forms that provide
      information about databases, tables, columns, or status
      information about the server. This section describes those
      following:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa67334323"><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 datatype">BINARY</span> LOG <span class="token keyword">STATUS</span>
<span class="token keyword">SHOW</span> <span class="token datatype">BINARY</span> <span class="token keyword">LOGS</span>
<span class="token keyword">SHOW</span> <span class="token keyword">BINLOG</span> <span class="token keyword">EVENTS</span> <span class="token punctuation">[</span><span class="token keyword">IN</span> <span class="token string">'<em class="replaceable">log_name</em>'</span><span class="token punctuation">]</span> <span class="token punctuation">[</span><span class="token keyword">FROM</span> <em class="replaceable">pos</em><span class="token punctuation">]</span> <span class="token punctuation">[</span><span class="token keyword">LIMIT</span> <span class="token punctuation">[</span><span class="token keyword"><em class="replaceable">offset</em></span><span class="token punctuation">,</span><span class="token punctuation">]</span> <span class="token keyword"><em class="replaceable">row_count</em></span><span class="token punctuation">]</span>
<span class="token keyword">SHOW</span> {<span class="token keyword">CHARACTER</span> <span class="token keyword">SET</span> <span class="token operator">|</span> <span class="token keyword">CHARSET</span>} <span class="token punctuation">[</span><em class="replaceable">like_or_where</em><span class="token punctuation">]</span>
<span class="token keyword">SHOW</span> <span class="token keyword">COLLATION</span> <span class="token punctuation">[</span><em class="replaceable">like_or_where</em><span class="token punctuation">]</span>
<span class="token keyword">SHOW</span> <span class="token punctuation">[</span><span class="token keyword">FULL</span><span class="token punctuation">]</span> <span class="token keyword">COLUMNS</span> <span class="token keyword">FROM</span> <em class="replaceable">tbl_name</em> <span class="token punctuation">[</span><span class="token keyword">FROM</span> <em class="replaceable">db_name</em><span class="token punctuation">]</span> <span class="token punctuation">[</span><em class="replaceable">like_or_where</em><span class="token punctuation">]</span>
<span class="token keyword">SHOW</span> <span class="token keyword">CREATE</span> <span class="token keyword">DATABASE</span> <em class="replaceable">db_name</em>
<span class="token keyword">SHOW</span> <span class="token keyword">CREATE</span> <span class="token keyword">EVENT</span> <em class="replaceable">event_name</em>
<span class="token keyword">SHOW</span> <span class="token keyword">CREATE</span> <span class="token keyword">FUNCTION</span> <em class="replaceable">func_name</em>
<span class="token keyword">SHOW</span> <span class="token keyword">CREATE</span> <span class="token keyword">PROCEDURE</span> <em class="replaceable">proc_name</em>
<span class="token keyword">SHOW</span> <span class="token keyword">CREATE</span> <span class="token keyword">TABLE</span> <em class="replaceable">tbl_name</em>
<span class="token keyword">SHOW</span> <span class="token keyword">CREATE</span> <span class="token keyword">TRIGGER</span> <em class="replaceable">trigger_name</em>
<span class="token keyword">SHOW</span> <span class="token keyword">CREATE</span> <span class="token keyword">VIEW</span> <em class="replaceable">view_name</em>
<span class="token keyword">SHOW</span> <span class="token keyword">DATABASES</span> <span class="token punctuation">[</span><em class="replaceable">like_or_where</em><span class="token punctuation">]</span>
<span class="token keyword">SHOW</span> <span class="token keyword">ENGINE</span> <em class="replaceable">engine_name</em> {<span class="token keyword">STATUS</span> <span class="token operator">|</span> <span class="token keyword">MUTEX</span>}
<span class="token keyword">SHOW</span> <span class="token punctuation">[</span><span class="token keyword">STORAGE</span><span class="token punctuation">]</span> <span class="token keyword">ENGINES</span>
<span class="token keyword">SHOW</span> <span class="token keyword">ERRORS</span> <span class="token punctuation">[</span><span class="token keyword">LIMIT</span> <span class="token punctuation">[</span><span class="token keyword"><em class="replaceable">offset</em></span><span class="token punctuation">,</span><span class="token punctuation">]</span> <span class="token keyword"><em class="replaceable">row_count</em></span><span class="token punctuation">]</span>
<span class="token keyword">SHOW</span> <span class="token keyword">EVENTS</span>
<span class="token keyword">SHOW</span> <span class="token keyword">FUNCTION</span> <span class="token keyword">CODE</span> <em class="replaceable">func_name</em>
<span class="token keyword">SHOW</span> <span class="token keyword">FUNCTION</span> <span class="token keyword">STATUS</span> <span class="token punctuation">[</span><em class="replaceable">like_or_where</em><span class="token punctuation">]</span>
<span class="token keyword">SHOW</span> <span class="token keyword">GRANTS</span> <span class="token keyword">FOR</span> <span class="token keyword"><em class="replaceable">user</em></span>
<span class="token keyword">SHOW</span> <span class="token keyword">INDEX</span> <span class="token keyword">FROM</span> <em class="replaceable">tbl_name</em> <span class="token punctuation">[</span><span class="token keyword">FROM</span> <em class="replaceable">db_name</em><span class="token punctuation">]</span>
<span class="token keyword">SHOW</span> <span class="token keyword">OPEN</span> <span class="token keyword">TABLES</span> <span class="token punctuation">[</span><span class="token keyword">FROM</span> <em class="replaceable">db_name</em><span class="token punctuation">]</span> <span class="token punctuation">[</span><em class="replaceable">like_or_where</em><span class="token punctuation">]</span>
<span class="token keyword">SHOW</span> <span class="token keyword">PLUGINS</span>
<span class="token keyword">SHOW</span> <span class="token keyword">PROCEDURE</span> <span class="token keyword">CODE</span> <em class="replaceable">proc_name</em>
<span class="token keyword">SHOW</span> <span class="token keyword">PROCEDURE</span> <span class="token keyword">STATUS</span> <span class="token punctuation">[</span><em class="replaceable">like_or_where</em><span class="token punctuation">]</span>
<span class="token keyword">SHOW</span> <span class="token keyword">PRIVILEGES</span>
<span class="token keyword">SHOW</span> <span class="token punctuation">[</span><span class="token keyword">FULL</span><span class="token punctuation">]</span> <span class="token keyword">PROCESSLIST</span>
<span class="token keyword">SHOW</span> <span class="token keyword">PROFILE</span> <span class="token punctuation">[</span><span class="token keyword"><em class="replaceable">types</em></span><span class="token punctuation">]</span> <span class="token punctuation">[</span><span class="token keyword">FOR</span> <span class="token keyword">QUERY</span> <em class="replaceable">n</em><span class="token punctuation">]</span> <span class="token punctuation">[</span><span class="token keyword">OFFSET</span> <em class="replaceable">n</em><span class="token punctuation">]</span> <span class="token punctuation">[</span><span class="token keyword">LIMIT</span> <em class="replaceable">n</em><span class="token punctuation">]</span>
<span class="token keyword">SHOW</span> <span class="token keyword">PROFILES</span>
<span class="token keyword">SHOW</span> <span class="token keyword">RELAYLOG</span> <span class="token keyword">EVENTS</span> <span class="token punctuation">[</span><span class="token keyword">IN</span> <span class="token string">'<em class="replaceable">log_name</em>'</span><span class="token punctuation">]</span> <span class="token punctuation">[</span><span class="token keyword">FROM</span> <em class="replaceable">pos</em><span class="token punctuation">]</span> <span class="token punctuation">[</span><span class="token keyword">LIMIT</span> <span class="token punctuation">[</span><span class="token keyword"><em class="replaceable">offset</em></span><span class="token punctuation">,</span><span class="token punctuation">]</span> <span class="token keyword"><em class="replaceable">row_count</em></span><span class="token punctuation">]</span>
<span class="token keyword">SHOW</span> <span class="token keyword">REPLICA</span> <span class="token keyword">STATUS</span> <span class="token punctuation">[</span><span class="token keyword">FOR</span> <span class="token keyword">CHANNEL</span> <span class="token keyword"><em class="replaceable">channel</em></span><span class="token punctuation">]</span>
<span class="token keyword">SHOW</span> <span class="token keyword">REPLICAS</span>
<span class="token keyword">SHOW</span> <span class="token punctuation">[</span><span class="token keyword">GLOBAL</span> <span class="token operator">|</span> <span class="token keyword">SESSION</span><span class="token punctuation">]</span> <span class="token keyword">STATUS</span> <span class="token punctuation">[</span><em class="replaceable">like_or_where</em><span class="token punctuation">]</span>
<span class="token keyword">SHOW</span> <span class="token keyword">TABLE</span> <span class="token keyword">STATUS</span> <span class="token punctuation">[</span><span class="token keyword">FROM</span> <em class="replaceable">db_name</em><span class="token punctuation">]</span> <span class="token punctuation">[</span><em class="replaceable">like_or_where</em><span class="token punctuation">]</span>
<span class="token keyword">SHOW</span> <span class="token punctuation">[</span><span class="token keyword">FULL</span><span class="token punctuation">]</span> <span class="token keyword">TABLES</span> <span class="token punctuation">[</span><span class="token keyword">FROM</span> <em class="replaceable">db_name</em><span class="token punctuation">]</span> <span class="token punctuation">[</span><em class="replaceable">like_or_where</em><span class="token punctuation">]</span>
<span class="token keyword">SHOW</span> <span class="token keyword">TRIGGERS</span> <span class="token punctuation">[</span><span class="token keyword">FROM</span> <em class="replaceable">db_name</em><span class="token punctuation">]</span> <span class="token punctuation">[</span><em class="replaceable">like_or_where</em><span class="token punctuation">]</span>
<span class="token keyword">SHOW</span> <span class="token punctuation">[</span><span class="token keyword">GLOBAL</span> <span class="token operator">|</span> <span class="token keyword">SESSION</span><span class="token punctuation">]</span> <span class="token keyword">VARIABLES</span> <span class="token punctuation">[</span><em class="replaceable">like_or_where</em><span class="token punctuation">]</span>
<span class="token keyword">SHOW</span> <span class="token keyword">WARNINGS</span> <span class="token punctuation">[</span><span class="token keyword">LIMIT</span> <span class="token punctuation">[</span><span class="token keyword"><em class="replaceable">offset</em></span><span class="token punctuation">,</span><span class="token punctuation">]</span> <span class="token keyword"><em class="replaceable">row_count</em></span><span class="token punctuation">]</span>

<em class="replaceable">like_or_where</em>: {
    <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>
}</code></pre>
  </div>
  <p>
   If the syntax for a given
   <a class="link" href="show.html" title="15.7.7 SHOW Statements">
    <code class="literal">
     SHOW
    </code>
   </a>
   statement includes a
   <a class="link" href="string-comparison-functions.html#operator_like">
    <code class="literal">
     LIKE
      '
     <em class="replaceable">
      <code>
       pattern
      </code>
     </em>
     '
    </code>
   </a>
   part,
   <code class="literal">
    '
    <em class="replaceable">
     <code>
      pattern
     </code>
    </em>
    '
   </code>
   is a
      string that can contain the SQL
   <code class="literal">
    %
   </code>
   and
   <code class="literal">
    _
   </code>
   wildcard characters. The pattern is useful
      for restricting statement output to matching values.
  </p>
  <p>
   Several
   <a class="link" href="show.html" title="15.7.7 SHOW Statements">
    <code class="literal">
     SHOW
    </code>
   </a>
   statements also accept
      a
   <code class="literal">
    WHERE
   </code>
   clause that provides more flexibility
      in specifying which rows to display. See
   <a class="xref" href="extended-show.html" title="28.8 Extensions to SHOW Statements">
    Section 28.8, “Extensions to SHOW Statements”
   </a>
   .
  </p>
  <p>
   In
   <a class="link" href="show.html" title="15.7.7 SHOW Statements">
    <code class="literal">
     SHOW
    </code>
   </a>
   statement results, user
      names and host names are quoted using backticks (`).
  </p>
  <p>
   Many MySQL APIs (such as PHP) enable you to treat the result
      returned from a
   <a class="link" href="show.html" title="15.7.7 SHOW Statements">
    <code class="literal">
     SHOW
    </code>
   </a>
   statement as
      you would a result set from a
   <a class="link" href="select.html" title="15.2.13 SELECT Statement">
    <code class="literal">
     SELECT
    </code>
   </a>
   ; see
   <a class="xref" href="connectors-apis.html" title="Chapter 31 Connectors and APIs">
    Chapter 31,
    <i>
     Connectors and APIs
    </i>
   </a>
   , or your API documentation for
      more information. In addition, you can work in SQL with results
      from queries on tables in the
   <code class="literal">
    INFORMATION_SCHEMA
   </code>
   database, which you cannot
      easily do with results from
   <a class="link" href="show.html" title="15.7.7 SHOW Statements">
    <code class="literal">
     SHOW
    </code>
   </a>
   statements. See
   <a class="xref" href="information-schema.html" title="Chapter 28 INFORMATION_SCHEMA Tables">
    Chapter 28,
    <i>
     INFORMATION_SCHEMA Tables
    </i>
   </a>
   .
  </p>
 </div>
 <br/>
</div>
