<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h4 class="title">
      <a name="show-errors">
      </a>
      15.7.7.18 SHOW ERRORS Statement
     </h4>
    </div>
   </div>
  </div>
  <a class="indexterm" name="idm46045170471424">
  </a>
  <a class="indexterm" name="idm46045170470352">
  </a>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa83674474"><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">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 function">COUNT</span><span class="token punctuation">(</span><span class="token operator">*</span><span class="token punctuation">)</span> <span class="token keyword">ERRORS</span></code></pre>
  </div>
  <p>
   <a class="link" href="show-errors.html" title="15.7.7.18 SHOW ERRORS Statement">
    <code class="literal">
     SHOW ERRORS
    </code>
   </a>
   is a diagnostic
        statement that is similar to
   <a class="link" href="show-warnings.html" title="15.7.7.42 SHOW WARNINGS Statement">
    <code class="literal">
     SHOW
        WARNINGS
    </code>
   </a>
   , except that it displays information only for
        errors, rather than for errors, warnings, and notes.
  </p>
  <p>
   The
   <code class="literal">
    LIMIT
   </code>
   clause has the same syntax as for
        the
   <a class="link" href="select.html" title="15.2.13 SELECT Statement">
    <code class="literal">
     SELECT
    </code>
   </a>
   statement. See
   <a class="xref" href="select.html" title="15.2.13 SELECT Statement">
    Section 15.2.13, “SELECT Statement”
   </a>
   .
  </p>
  <p>
   The
   <a class="link" href="show-errors.html" title="15.7.7.18 SHOW ERRORS Statement">
    <code class="literal">
     SHOW COUNT(*)
        ERRORS
    </code>
   </a>
   statement displays the number of errors. You
        can also retrieve this number from the
   <a class="link" href="server-system-variables.html#sysvar_error_count">
    <code class="literal">
     error_count
    </code>
   </a>
   variable:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa40189957"><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 function">COUNT</span><span class="token punctuation">(</span><span class="token operator">*</span><span class="token punctuation">)</span> <span class="token keyword">ERRORS</span><span class="token punctuation">;</span>
<span class="token keyword">SELECT</span> <span class="token variable">@@error_count</span><span class="token punctuation">;</span></code></pre>
  </div>
  <p>
   <a class="link" href="show-errors.html" title="15.7.7.18 SHOW ERRORS Statement">
    <code class="literal">
     SHOW ERRORS
    </code>
   </a>
   and
   <a class="link" href="server-system-variables.html#sysvar_error_count">
    <code class="literal">
     error_count
    </code>
   </a>
   apply only to
        errors, not warnings or notes. In other respects, they are
        similar to
   <a class="link" href="show-warnings.html" title="15.7.7.42 SHOW WARNINGS Statement">
    <code class="literal">
     SHOW WARNINGS
    </code>
   </a>
   and
   <a class="link" href="server-system-variables.html#sysvar_warning_count">
    <code class="literal">
     warning_count
    </code>
   </a>
   . In particular,
   <a class="link" href="show-errors.html" title="15.7.7.18 SHOW ERRORS Statement">
    <code class="literal">
     SHOW ERRORS
    </code>
   </a>
   cannot display
        information for more than
   <a class="link" href="server-system-variables.html#sysvar_max_error_count">
    <code class="literal">
     max_error_count
    </code>
   </a>
   messages, and
   <a class="link" href="server-system-variables.html#sysvar_error_count">
    <code class="literal">
     error_count
    </code>
   </a>
   can exceed the
        value of
   <a class="link" href="server-system-variables.html#sysvar_max_error_count">
    <code class="literal">
     max_error_count
    </code>
   </a>
   if the
        number of errors exceeds
   <a class="link" href="server-system-variables.html#sysvar_max_error_count">
    <code class="literal">
     max_error_count
    </code>
   </a>
   .
  </p>
  <p>
   For more information, see
   <a class="xref" href="show-warnings.html" title="15.7.7.42 SHOW WARNINGS Statement">
    Section 15.7.7.42, “SHOW WARNINGS Statement”
   </a>
   .
  </p>
 </div>
 <br/>
</div>
