Top 10 SQL Errors
How to Fix PostgreSQL "column does not exist"
PostgreSQL cannot find the column name you used.
Example error message
ERROR: column "username" does not exist
Common causes
- The column name is misspelled.
- The column belongs to another table alias.
- The column was created with quoted uppercase letters.
- You forgot to join the table containing the column.
Quick fix
SELECT u.name FROM users u;
Checklist
- Check spelling of table and column names.
- Check the correct database, schema, and table alias.
- Compare your SQL dialect: MySQL, PostgreSQL, SQL Server, Oracle, or SQLite.
- Run a very small SELECT query first, then add conditions step by step.