// Oracle error reference

ORA-00936: missing expression

Oracle expected a value or expression and found something else: an empty select list, a trailing comma, or a missing operand.

Error code
ORA-00936
Category
Syntax and SQL statements
Error message
missing expression

What it means

ORA-00936 is raised when the parser reaches a place that needs an expression, such as a column in the select list or the right side of an operator, and there isn't one.

Common causes

  • A trailing comma before FROM: SELECT a, b, FROM t.
  • An empty select list, or SELECT immediately followed by FROM.
  • A missing operand: WHERE salary > or WHERE id IN ().
  • A bind placeholder or substitution variable that came through empty.

How to fix it

  1. Look just before the position Oracle reports, and remove the stray comma or add the missing value.

    SELECT employee_id, last_name
    FROM hr.employees
    WHERE salary > 5000;
  2. If the SQL is built in code, print the final text and check the parts that come from variables.

Related errors

More syntax and sql statements errors

The code and message text are from the Oracle Database Error Help. Browse the full Oracle error list or search every database error.

// fewer errors, faster fixes

Work on Oracle in SQLly

A native SQL client for macOS, Windows and Linux with schema-aware IntelliSense, guardrails for risky statements and clear error messages, for Oracle and the other databases you use.