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.
- 2627 Violation of PRIMARY KEY / UNIQUE constraint
- 547 Statement conflicted with a FOREIGN KEY or CHECK constraint
- 18456 Login failed for user
- 4060 Cannot open database requested by the login
- 53 A network-related or instance-specific error (server not found)
- 26 Error locating server or instance specified (SQL Network Interfaces)
- Constraint & Integrity 5
- Logins & Permissions 19
- Connectivity 9
- Syntax & Object Resolution 22
- Data Type & Conversion 15
- Concurrency & Locking 2
- Transactions 5
- Log & Storage Space 3
- Backup & Restore 15
- Database State & Recovery 13
- Corruption & Consistency 8
- Memory 6
- Query Processing & Performance 7
- High Availability 8
- SQL Server Agent 4
- Linked Servers 7
MySQL server and client errors by number and SQLSTATE, with examples reproduced on MySQL 8.0.
- 2002 Can't connect to local MySQL server through socket
- 1045 Access denied for user (using password: YES or NO)
- 1064 You have an error in your SQL syntax
- 1054 Unknown column
- 1146 Table doesn't exist
- 1046 No database selected
SQLite messages such as database is locked and constraint failed, reproduced with the SQLite library.
- CONSTRAINT UNIQUE constraint failed
- CONSTRAINT FOREIGN KEY constraint failed
- BUSY database is locked
- CORRUPT database disk image is malformed
- ERROR no such table
PostgreSQL errors by SQLSTATE, with SQL-level examples run in PGlite.
- 23505 duplicate key value violates unique constraint
- 23503 insert or update on table violates foreign key constraint
- 42P01 relation does not exist
- 42703 column does not exist
- 22P02 invalid input syntax for type integer
- 25P02 current transaction is aborted, commands ignored until end of transaction block
Oracle Database ORA- and PLS- errors by code, documented from Oracle's error reference (current releases and 19c).
- ORA-00001 unique constraint violated
- ORA-02291 integrity constraint violated - parent key not found
- ORA-00942 table or view does not exist
- ORA-00904 invalid identifier
- ORA-01722 invalid number
- ORA-12899 value too large for column
MongoDB server and driver errors by code and code name, documented from MongoDB's documentation and error code list.
- 11000 E11000 duplicate key error
- 121 Document failed validation
- 2 BadValue: unknown operator and other invalid query values
- 26 NamespaceNotFound: ns does not exist or ns not found
- 18 Authentication failed
- 13 not authorized on database to execute command
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.
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).
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.
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).
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.
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.
MongoServerError: E11000 duplicate key error ...
The error document has a numeric code and a code name (11000 / DuplicateKey); search either, or the message.