<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="show-tables">
      </a>
      15.7.7.39 SHOW TABLES Statement
     </h4>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045169128400">
  </a>
  <a class="indexterm" name="idm46045169125632">
  </a>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa14388240"><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 punctuation">[</span><span class="token keyword">EXTENDED</span><span class="token punctuation">]</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> <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-tables.html" title="15.7.7.39 SHOW TABLES Statement">
    <code class="literal">
     SHOW TABLES
    </code>
   </a>
   lists the
        non-
   <code class="literal">
    TEMPORARY
   </code>
   tables in a given database. You
        can also get this list using the
   <a class="link" href="mysqlshow.html" title="6.5.6 mysqlshow — Display Database, Table, and Column Information">
    <span class="command">
     <strong>
      mysqlshow
      <em class="replaceable">
       <code>
        db_name
       </code>
      </em>
     </strong>
    </span>
   </a>
   command. The
   <a class="link" href="string-comparison-functions.html#operator_like">
    <code class="literal">
     LIKE
    </code>
   </a>
   clause, if present, indicates
        which table names to match. 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>
   Matching performed by the
   <code class="literal">
    LIKE
   </code>
   clause is
        dependent on the setting of the
   <a class="link" href="server-system-variables.html#sysvar_lower_case_table_names">
    <code class="literal">
     lower_case_table_names
    </code>
   </a>
   system
        variable.
  </p>
  <p>
   The optional
   <code class="literal">
    EXTENDED
   </code>
   modifier causes
   <a class="link" href="show-tables.html" title="15.7.7.39 SHOW TABLES Statement">
    <code class="literal">
     SHOW TABLES
    </code>
   </a>
   to list hidden tables
        created by failed
   <a class="link" href="alter-table.html" title="15.1.9 ALTER TABLE Statement">
    <code class="literal">
     ALTER TABLE
    </code>
   </a>
   statements. These temporary tables have names beginning with
   <code class="literal">
    #sql
   </code>
   and can be dropped using
   <a class="link" href="drop-table.html" title="15.1.32 DROP TABLE Statement">
    <code class="literal">
     DROP TABLE
    </code>
   </a>
   .
  </p>
  <p>
   This statement also lists any views in the database. The
        optional
   <code class="literal">
    FULL
   </code>
   modifier causes
   <a class="link" href="show-tables.html" title="15.7.7.39 SHOW TABLES Statement">
    <code class="literal">
     SHOW TABLES
    </code>
   </a>
   to display a second
        output column with values of
   <code class="literal">
    BASE TABLE
   </code>
   for a
        table,
   <code class="literal">
    VIEW
   </code>
   for a view, or
   <code class="literal">
    SYSTEM
        VIEW
   </code>
   for an
   <code class="literal">
    INFORMATION_SCHEMA
   </code>
   table.
  </p>
  <p>
   If you have no privileges for a base table or view, it does not
        show up in the output from
   <a class="link" href="show-tables.html" title="15.7.7.39 SHOW TABLES Statement">
    <code class="literal">
     SHOW
        TABLES
    </code>
   </a>
   or
   <a class="link" href="mysqlshow.html" title="6.5.6 mysqlshow — Display Database, Table, and Column Information">
    <span class="command">
     <strong>
      mysqlshow db_name
     </strong>
    </span>
   </a>
   .
  </p>
  <p>
   Table information is also available from the
   <code class="literal">
    INFORMATION_SCHEMA
   </code>
   <a class="link" href="information-schema-tables-table.html" title="28.3.38 The INFORMATION_SCHEMA TABLES Table">
    <code class="literal">
     TABLES
    </code>
   </a>
   table. See
   <a class="xref" href="information-schema-tables-table.html" title="28.3.38 The INFORMATION_SCHEMA TABLES Table">
    Section 28.3.38, “The INFORMATION_SCHEMA TABLES Table”
   </a>
   .
  </p>
 </div>
 <br/>
</div>
