<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="show-collation">
      </a>
      15.7.7.5 SHOW COLLATION Statement
     </h4>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045171110592">
  </a>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa93033195"><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">COLLATION</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>
   This statement lists collations supported by the server. By
        default, the output from
   <a class="link" href="show-collation.html" title="15.7.7.5 SHOW COLLATION Statement">
    <code class="literal">
     SHOW
        COLLATION
    </code>
   </a>
   includes all available collations. The
   <a class="link" href="string-comparison-functions.html#operator_like">
    <code class="literal">
     LIKE
    </code>
   </a>
   clause, if present, indicates
        which collation 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>
   . For
        example:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa14418789"><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">COLLATION</span> <span class="token keyword">WHERE</span> <span class="token keyword">Charset</span> <span class="token operator">=</span> <span class="token string">'latin1'</span><span class="token punctuation">;</span>
<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><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><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>
<span class="token output"><span class="token punctuation">|</span> Collation         <span class="token punctuation">|</span> Charset <span class="token punctuation">|</span> Id <span class="token punctuation">|</span> Default <span class="token punctuation">|</span> Compiled <span class="token punctuation">|</span> Sortlen <span class="token punctuation">|</span></span>
<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><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><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>
<span class="token output"><span class="token punctuation">|</span> latin1_german1_ci <span class="token punctuation">|</span> latin1  <span class="token punctuation">|</span>  5 <span class="token punctuation">|</span>         <span class="token punctuation">|</span> Yes      <span class="token punctuation">|</span>       1 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> latin1_swedish_ci <span class="token punctuation">|</span> latin1  <span class="token punctuation">|</span>  8 <span class="token punctuation">|</span> Yes     <span class="token punctuation">|</span> Yes      <span class="token punctuation">|</span>       1 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> latin1_danish_ci  <span class="token punctuation">|</span> latin1  <span class="token punctuation">|</span> 15 <span class="token punctuation">|</span>         <span class="token punctuation">|</span> Yes      <span class="token punctuation">|</span>       1 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> latin1_german2_ci <span class="token punctuation">|</span> latin1  <span class="token punctuation">|</span> 31 <span class="token punctuation">|</span>         <span class="token punctuation">|</span> Yes      <span class="token punctuation">|</span>       2 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> latin1_bin        <span class="token punctuation">|</span> latin1  <span class="token punctuation">|</span> 47 <span class="token punctuation">|</span>         <span class="token punctuation">|</span> Yes      <span class="token punctuation">|</span>       1 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> latin1_general_ci <span class="token punctuation">|</span> latin1  <span class="token punctuation">|</span> 48 <span class="token punctuation">|</span>         <span class="token punctuation">|</span> Yes      <span class="token punctuation">|</span>       1 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> latin1_general_cs <span class="token punctuation">|</span> latin1  <span class="token punctuation">|</span> 49 <span class="token punctuation">|</span>         <span class="token punctuation">|</span> Yes      <span class="token punctuation">|</span>       1 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> latin1_spanish_ci <span class="token punctuation">|</span> latin1  <span class="token punctuation">|</span> 94 <span class="token punctuation">|</span>         <span class="token punctuation">|</span> Yes      <span class="token punctuation">|</span>       1 <span class="token punctuation">|</span></span>
<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><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><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></code></pre>
  </div>
  <p>
   <a class="link" href="show-collation.html" title="15.7.7.5 SHOW COLLATION Statement">
    <code class="literal">
     SHOW COLLATION
    </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">
       Collation
      </code>
     </p>
     <p>
      The collation name.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       Charset
      </code>
     </p>
     <p>
      The name of the character set with which the collation is
            associated.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       Id
      </code>
     </p>
     <p>
      The collation ID.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       Default
      </code>
     </p>
     <p>
      Whether the collation is the default for its character set.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       Compiled
      </code>
     </p>
     <p>
      Whether the character set is compiled into the server.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       Sortlen
      </code>
     </p>
     <p>
      This is related to the amount of memory required to sort
            strings expressed in the character set.
     </p>
    </li>
    <li class="listitem">
     <p>
      <code class="literal">
       Pad_attribute
      </code>
     </p>
     <p>
      The collation pad attribute, one of
      <code class="literal">
       NO
            PAD
      </code>
      or
      <code class="literal">
       PAD SPACE
      </code>
      . This
            attribute affects whether trailing spaces are significant in
            string comparisons; for more information, see
      <a class="xref" href="charset-binary-collations.html#charset-binary-collations-trailing-space-comparisons" title="Trailing Space Handling in Comparisons">
       Trailing Space Handling in Comparisons
      </a>
      .
     </p>
    </li>
   </ul>
  </div>
  <p>
   To see the default collation for each character set, use the
        following statement.
   <code class="literal">
    Default
   </code>
   is a reserved
        word, so to use it as an identifier, it must be quoted as such:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa83883740"><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">COLLATION</span> <span class="token keyword">WHERE</span> <span class="token punctuation">`</span><span class="token keyword">Default</span><span class="token punctuation">`</span> <span class="token operator">=</span> <span class="token string">'Yes'</span><span class="token punctuation">;</span>
<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><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><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>
<span class="token output"><span class="token punctuation">|</span> Collation           <span class="token punctuation">|</span> Charset  <span class="token punctuation">|</span> Id <span class="token punctuation">|</span> Default <span class="token punctuation">|</span> Compiled <span class="token punctuation">|</span> Sortlen <span class="token punctuation">|</span></span>
<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><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><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>
<span class="token output"><span class="token punctuation">|</span> big5_chinese_ci     <span class="token punctuation">|</span> big5     <span class="token punctuation">|</span>  1 <span class="token punctuation">|</span> Yes     <span class="token punctuation">|</span> Yes      <span class="token punctuation">|</span>       1 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> dec8_swedish_ci     <span class="token punctuation">|</span> dec8     <span class="token punctuation">|</span>  3 <span class="token punctuation">|</span> Yes     <span class="token punctuation">|</span> Yes      <span class="token punctuation">|</span>       1 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> cp850_general_ci    <span class="token punctuation">|</span> cp850    <span class="token punctuation">|</span>  4 <span class="token punctuation">|</span> Yes     <span class="token punctuation">|</span> Yes      <span class="token punctuation">|</span>       1 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> hp8_english_ci      <span class="token punctuation">|</span> hp8      <span class="token punctuation">|</span>  6 <span class="token punctuation">|</span> Yes     <span class="token punctuation">|</span> Yes      <span class="token punctuation">|</span>       1 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> koi8r_general_ci    <span class="token punctuation">|</span> koi8r    <span class="token punctuation">|</span>  7 <span class="token punctuation">|</span> Yes     <span class="token punctuation">|</span> Yes      <span class="token punctuation">|</span>       1 <span class="token punctuation">|</span></span>
<span class="token output"><span class="token punctuation">|</span> latin1_swedish_ci   <span class="token punctuation">|</span> latin1   <span class="token punctuation">|</span>  8 <span class="token punctuation">|</span> Yes     <span class="token punctuation">|</span> Yes      <span class="token punctuation">|</span>       1 <span class="token punctuation">|</span></span>
<span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span></code></pre>
  </div>
  <p>
   Collation information is also available from the
   <code class="literal">
    INFORMATION_SCHEMA
   </code>
   <a class="link" href="information-schema-collations-table.html" title="28.3.6 The INFORMATION_SCHEMA COLLATIONS Table">
    <code class="literal">
     COLLATIONS
    </code>
   </a>
   table. See
   <a class="xref" href="information-schema-collations-table.html" title="28.3.6 The INFORMATION_SCHEMA COLLATIONS Table">
    Section 28.3.6, “The INFORMATION_SCHEMA COLLATIONS Table”
   </a>
   .
  </p>
 </div>
 <br/>
</div>
