# column "nme" of relation "pets" does not exist / table pets has no column named nme

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


**Short answer:** INSERT or UPDATE names a column the table doesn't have: a typo, a column that was never created, or the wrong table. List the table's columns and use their exact names.

## The exact messages

- PostgreSQL: `ERROR: column "nme" of relation "pets" does not exist`
- SQLite: `table pets has no column named nme`

## How PostgreSQL prints it

```
ERROR:  column "nme" of relation "pets" does not exist
LINE 1: INSERT INTO pets (id, nme, species, age, weight_kg, adopted, arrived_on)
                              ^
```

## Why it happens

### A typo in the column list

`INSERT INTO pets (nme)`: the table has `name`.

### The column was never added

Code expects a column a migration should have created. Add it with ALTER TABLE, or drop it from the statement.

### Capitals in quotes

A column created as `"Name"` must be written that way. Plain `name` won't match it in PostgreSQL.

## The broken query

```sql
INSERT INTO pets (id, nme, species, age, weight_kg, adopted, arrived_on)
VALUES (21, 'Tango', 'dog', 2, 12.5, false, '2026-11-17');
SELECT 1;
```

## The fix

```sql
INSERT INTO pets (id, name, species, age, weight_kg, adopted, arrived_on)
VALUES (21, 'Tango', 'dog', 2, 12.5, false, '2026-11-17');
SELECT id, name, species FROM pets WHERE id = 21;
```

With the real column name, the row goes in (and the run is rolled back afterwards).

| id | name | species |
| --- | --- | --- |
| 21 | Tango | dog |
