All pages
Powered by GitBook
1 of 1

Loading...

SHOW ERRORS

Display errors from the last executed statement. View error codes, messages, and types for recent failures.

Syntax

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

Description

This statement is similar to SHOW WARNINGS, except that instead of displaying errors, warnings, and notes, it displays only errors.

The LIMIT clause has the same syntax as for the statement.

The SHOW COUNT(*) ERRORS statement displays the number of errors. You can also retrieve this number from the variable.

The value of might be greater than the number of messages displayed by if the system variable is set so low that not all messages are stored.

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

Examples

This page is licensed: GPLv2, originally from

SELECT
error_count
error_count
SHOW WARNINGS
max_error_count
fill_help_tables.sql
SHOW COUNT(*) ERRORS;
SELECT @@error_count;
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 |
+-------+------+---------------------------+