# SHOW ERRORS

## Syntax

```sql
SHOW ERRORS [LIMIT [offset,] row_count]
SHOW ERRORS [LIMIT row_count OFFSET offset]
SHOW COUNT(*) ERRORS
```

## Description

This statement is similar to [SHOW WARNINGS](/docs/server/reference/sql-statements/administrative-sql-statements/show/show-warnings.md), except that instead of displaying errors, warnings, and notes, it displays only errors.

The `LIMIT` clause has the same syntax as for the [SELECT](/docs/server/reference/sql-statements/data-manipulation/selecting-data/select.md) statement.

The `SHOW COUNT(*) ERRORS` statement displays the number of errors. You can also retrieve this number from the [error\_count](/docs/server/server-management/variables-and-modes/server-system-variables.md#error_count) variable.

```sql
SHOW COUNT(*) ERRORS;
SELECT @@error_count;
```

The value of [error\_count](/docs/server/server-management/variables-and-modes/server-system-variables.md#error_count) might be greater than the number of messages displayed by [SHOW WARNINGS](/docs/server/reference/sql-statements/administrative-sql-statements/show/show-warnings.md) if the [max\_error\_count](/docs/server/server-management/variables-and-modes/server-system-variables.md#max_error_count) system variable is set so low that not all messages are stored.

For a list of MariaDB error codes, see MariaDB Error Codes.

## Examples

```sql
SELECT f();
ERROR 1305 (42000): FUNCTION f does not exist

SHOW COUNT(*) ERRORS;
+-----------------------+
| @@session.error_count |
+-----------------------+
|                     1 |
+-----------------------+

SHOW ERRORS;
+-------+------+---------------------------+
| Level | Code | Message                   |
+-------+------+---------------------------+
| Error | 1305 | FUNCTION f does not exist |
+-------+------+---------------------------+
```

<sub>*This page is licensed: GPLv2, originally from*</sub> [<sub>*fill\_help\_tables.sql*</sub>](https://github.com/MariaDB/server/blob/main/scripts/fill_help_tables.sql)

{% @marketo/form formId="4316" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-errors.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
