# Postgres error 42601: syntax error at or near "x"

> The SQL text could not be parsed.

Source: https://scribase.com/postgres-errors/42601

SQLSTATE class: Syntax Error or Access Rule Violation. Over PostgREST/supabase-js this maps to HTTP 400.

## Causes

- A reserved word used as a name without double quotes (user, order, group).
- A missing comma or parenthesis, or a trailing comma before FROM.
- Placeholders in the wrong style for the driver ($1 versus ? versus :name).
- String values interpolated into SQL without quoting, which also opens the door to SQL injection.

## Fixes

- Look at the token after "at or near": the mistake is just before it.
- Quote reserved words ("user") or rename the column.
- Always pass values as bound parameters, never by string concatenation.