SQL Error Reference
Plain-English explanations, common causes, and fixes for 58 common SQL errors across MySQL, PostgreSQL, Oracle, MSSQL, and SQLite.
MySQL
15 errorsMySQL 1064: You Have an Error in Your SQL Syntax
MySQL 1045: Access Denied for User
MySQL 1215: Cannot Add Foreign Key Constraint
MySQL 1054: Unknown Column in Field List
MySQL 1146: Table Doesn't Exist
MySQL 1062: Duplicate Entry for Key
MySQL 1292: Incorrect Datetime Value
MySQL 1406: Data Too Long for Column
MySQL 1451: Cannot Delete or Update a Parent Row
MySQL 1366: Incorrect Integer Value
MySQL 1265: Data Truncated for Column
MySQL 1175: Safe Update Mode — No WHERE with Key
MySQL 2006: MySQL Server Has Gone Away
MySQL 1093: Can't Specify Target Table for Update in FROM Clause
MySQL 1264: Out of Range Value for Column
PostgreSQL
17 errorsPostgreSQL: Relation Does Not Exist
PostgreSQL: Column Does Not Exist
PostgreSQL: Operator Does Not Exist
PostgreSQL: Null Value Violates Not-Null Constraint
PostgreSQL: Duplicate Key Value Violates Unique Constraint
PostgreSQL: Foreign Key Constraint Violation
PostgreSQL: Permission Denied for Table
PostgreSQL: Syntax Error at or Near
PostgreSQL: Division by Zero
PostgreSQL: Deadlock Detected
PostgreSQL: Could Not Connect to Server
PostgreSQL: Value Too Long for Type Character Varying
PostgreSQL: Invalid Input Syntax for Type Integer
PostgreSQL: Too Many Connections
PostgreSQL: Missing FROM-Clause Entry for Table
PostgreSQL: Invalid Datetime Format
PostgreSQL: Function Does Not Exist
Oracle
10 errorsORA-00942: Table or View Does Not Exist
ORA-01722: Invalid Number
ORA-00001: Unique Constraint Violated
ORA-00904: Invalid Identifier
ORA-01400: Cannot Insert NULL into Column
ORA-00933: SQL Command Not Properly Ended
ORA-02291: Integrity Constraint Violated — Parent Key Not Found
ORA-00979: Not a GROUP BY Expression
ORA-01017: Invalid Username/Password; Logon Denied
ORA-00054: Resource Busy and Acquire with NOWAIT Specified
MSSQL
11 errorsMSSQL 208: Invalid Object Name
MSSQL 547: Foreign Key Constraint Conflict
MSSQL 2627: Unique Constraint Violation
MSSQL 102: Incorrect Syntax Near
MSSQL 4064: Cannot Open Database Requested by Login
MSSQL 1205: Transaction Was Deadlocked
MSSQL 8134: Divide by Zero Error Encountered
MSSQL 515: Cannot Insert NULL into Column
MSSQL 3621: The Statement Has Been Terminated
MSSQL 1222: Lock Request Time Out Period Exceeded
MSSQL 245: Conversion Failed When Converting VARCHAR to INT
SQLite
5 errorsLooking for a serverless Postgres database?
Neon offers a generous free tier with instant branching and auto-scaling — perfect for side projects.
Have a query causing one of these errors?
Paste it into SQLbuddy for an instant plain-English explanation.
Analyze My Query →