# argument of WHERE must be type boolean, not type numeric

Source: https://sqlstreak.com/sql/errors/argument-of-where-must-be-type-boolean · Tested on PostgreSQL 18.6 and SQLite 3.54.1; results generated 2026-11-22.


**Short answer:** PostgreSQL wants a true-or-false condition after WHERE, AND and OR. `WHERE price` isn't one; compare the value: `WHERE price > 10`, `WHERE price IS NOT NULL`.

## The exact messages

- PostgreSQL: `ERROR: argument of WHERE must be type boolean, not type numeric`

## How PostgreSQL prints it

```
ERROR:  argument of WHERE must be type boolean, not type numeric
LINE 3: WHERE price;
              ^
```

## Why it happens

### A missing comparison

`WHERE price` or `WHERE name` on its own, often after editing a condition and deleting half of it.

### A 1/0 flag column

Integer flags (`is_active`) act as booleans in SQLite. In PostgreSQL compare them: `WHERE is_active = 1`, or make the column BOOLEAN.

## The broken query

```sql
SELECT name, price
FROM menu_items
WHERE price;
```

## The fix

```sql
SELECT name, price
FROM menu_items
WHERE price > 10;
```

A comparison gives true or false for each row, which is what WHERE needs.

| name | price |
| --- | --- |
| Margherita | 11 |
| Pepperoni Rocket | 13.5 |
| Four Cheese Orbit | 14 |
| BBQ Meteor | 15.5 |
| Veggie Nebula | 13 |

## What SQLite does instead

SQLite treats any non-zero number as true, so `WHERE price` keeps every row whose price isn't 0 or NULL. It looks like it works, which is why the bug survives until the query meets PostgreSQL.
