Skip to content

Database Error Library

Paste an error message, number or code from SQL Server, MySQL, SQLite, PostgreSQL, Oracle Database or MongoDB. We recognise which database it comes from and take you to the right page: what it means, read-only checks and safe fixes.

Error libraries

Microsoft SQL Server and Azure SQL errors by number, with read-only diagnostics checked on SQL Server 2025.

Common errors
Categories

MySQL server and client errors by number and SQLSTATE, with examples reproduced on MySQL 8.0.

Common errors
Categories

SQLite messages such as database is locked and constraint failed, reproduced with the SQLite library.

Common errors
Categories

PostgreSQL errors by SQLSTATE, with SQL-level examples run in PGlite.

Common errors
Categories

Oracle Database ORA- and PLS- errors by code, documented from Oracle's error reference (current releases and 19c).

Common errors
Categories

MongoDB server and driver errors by code and code name, documented from MongoDB's documentation and error code list.

Common errors
Categories

How to read your error message

Each database reports errors in its own format, and the same number can mean something unrelated in another product. This is what to look for before you search.

SQL Server
Msg 2627, Level 14, State 1, Line 7

The number after Msg is the error number; State narrows down the cause for some errors (such as 18456).

MySQL
ERROR 1062 (23000): Duplicate entry ...

The four-digit number is the error code; the five characters in brackets are the SQLSTATE, which several errors share.

SQLite
Runtime error near line 3: UNIQUE constraint failed: customers.email (19)

SQLite has no per-message numbers: search the message text. The number in brackets is the result code (19 = SQLITE_CONSTRAINT).

PostgreSQL
ERROR:  duplicate key value violates unique constraint ...

psql prints the message; drivers also report the five-character SQLSTATE (here 23505), which is how pages are organised.

Oracle Database
ORA-00942: table or view does not exist

Search the first ORA- or PLS- code; lines below it (such as ORA-06512) show where the error happened.

MongoDB
MongoServerError: E11000 duplicate key error ...

The error document has a numeric code and a code name (11000 / DuplicateKey); search either, or the message.