# column "x" does not exist / no such column: x

Source: https://sqlstreak.com/sql/errors/column-does-not-exist · Tested on PostgreSQL 18.6 and SQLite 3.54.1; results generated 2026-11-22.


**Short answer:** The database can't find a column with that name in the tables listed in `FROM`. Check the spelling against the table, join the table the column really lives in, and keep text in single quotes: double quotes mean a column name.

## The exact messages

- PostgreSQL: `ERROR: column "nme" does not exist`
- SQLite: `no such column: nme`

## How PostgreSQL prints it

```
ERROR:  column "nme" does not exist
LINE 1: SELECT nme, city
               ^
HINT:  Perhaps you meant to reference the column "customers.name".
```

## Why it happens

### A typo in the column name

`nme` instead of `name`. PostgreSQL often adds a hint such as “Perhaps you meant to reference the column…”; read it, it's usually right.

### The column belongs to another table

Asking for `ordered_on` while selecting only from `customers`. Join `orders` first; a column is only visible when its table is in `FROM` or a `JOIN`.

### Text in double quotes

`WHERE city = "Austin"` asks for a column called Austin. See the page on double quotes for the full story.

### An alias from SELECT used in WHERE

`WHERE total > 10` when `total` is an alias created in `SELECT`. WHERE runs before SELECT, so the alias doesn't exist yet.

## The broken query

```sql
SELECT nme, city
FROM customers;
```

## The fix

```sql
SELECT name, city
FROM customers;
```

Use the column's exact name. Run `SELECT * FROM customers LIMIT 1;` to see every column of a table.

| name | city |
| --- | --- |
| Maya Ortiz | Austin |
| Jonah Reed | Denver |
| Priya Nair | Austin |
| Tomás Herrera | Boston |
| Ellie Park | Denver |
| Sam Okafor | Boston |

(6 of 10 rows)
