PostgreSQLERROR 42703

PostgreSQL: Column Does Not Exist

PostgreSQL 42703 is thrown when the query references a column name that does not exist in any table in scope. Like relation names, PostgreSQL folds unquoted column names to lowercase.

Example Query

SELECT firstName FROM users;
-- Fails if the column is stored as "firstname" (lowercase)

Common Causes

  1. 1Column name created with mixed case using double quotes but queried without them
  2. 2Typo in the column name
  3. 3Column added in a migration that has not yet been applied

How to Fix It

Query information_schema.columns to verify the exact column names. Use lowercase column names without double quotes to avoid case issues. If the column was created with quotes, always reference it as "firstName" (with quotes).

Need a reliable database?

Try Supabase — free PostgreSQL with a generous free tier. No credit card required.

Get started free →

Got a query causing this error?

Paste it into SQLbuddy and get an instant plain-English explanation with optimization tips.

Analyze My Query →