This is a read-only copy of the MariaDB Knowledgebase generated on 2024-11-21. For the latest, interactive version please visit https://mariadb.com/kb/.

SHOW ERRORS

Sintassi

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

Spiegazione

Questa istruzione è simile a SHOW WARNINGS, ma invece di mostrare gli errori, i warning e le note, mostra solo gli errori.

La clausola LIMIT ha la stessa sintassi che si trova nell'istruzione SELECT.

L'istruzione SHOW COUNT(*) ERRORS mostra il numero di errori. E' possibile conoscere questo numero anche interrogando la variabile error_count:

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

Examples

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 |
+-------+------+---------------------------+
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.