# INSERT has more expressions than target columns / table has 4 columns but 5 values were supplied

Source: https://sqlstreak.com/sql/errors/insert-has-more-expressions-than-target-columns · Tested on PostgreSQL 18.6 and SQLite 3.54.1; results generated 2026-11-22.


**Short answer:** The number of values doesn't match the number of columns. Name the columns you're filling, `INSERT INTO customers (id, name, city, joined_on) VALUES (…)`, and give exactly one value per named column.

## The exact messages

- PostgreSQL: `ERROR: INSERT has more expressions than target columns`
- SQLite: `table customers has 4 columns but 5 values were supplied`

## How PostgreSQL prints it

```
ERROR:  INSERT has more expressions than target columns
LINE 2: VALUES (99, 'Ann Lee', 'Oslo', '2026-03-01', 'VIP');
                                                     ^
```

## Why it happens

### One value too many

An extra value with nowhere to go, often a column you thought the table had. Check the table's columns before inserting.

### No column list

`INSERT INTO t VALUES (…)` must supply every column in table order. Naming the columns makes the statement survive the day someone adds a column.

### Too few values

SQLite rejects too few values too. PostgreSQL fills missing trailing columns with their defaults instead, which then trips a NOT NULL constraint if the column has no default.

## The broken query

```sql
INSERT INTO customers
VALUES (99, 'Ann Lee', 'Oslo', '2026-03-01', 'VIP');
SELECT * FROM customers WHERE id = 99;
```

## The fix

```sql
INSERT INTO customers (id, name, city, joined_on)
VALUES (99, 'Ann Lee', 'Oslo', '2026-03-01');
SELECT * FROM customers WHERE id = 99;
```

Four named columns, four values. The run is rolled back afterwards, so the sample data stays as it was.

| id | name | city | joined_on |
| --- | --- | --- | --- |
| 99 | Ann Lee | Oslo | 2026-03-01 |
