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
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
SELECTimmediately followed byFROM. - A missing operand:
WHERE salary >orWHERE id IN (). - A bind placeholder or substitution variable that came through empty.
How to fix it
-
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;
-
If the SQL is built in code, print the final text and check the parts that come from variables.
Related errors
ORA-00933SQL command not properly endedORA-00907missing right parenthesisORA-00921unexpected end of SQL command102SQL Server: Incorrect syntax near42601PostgreSQL: syntax error at or near
More syntax and sql statements errors
ORA-00911invalid characterORA-00917missing commaORA-00918column ambiguously definedORA-00923FROM keyword not found where expectedORA-00937not a single-group group functionORA-00979not a GROUP BY expressionORA-01427single-row subquery returns more than one rowORA-01008not all variables bound
The code and message text are from the Oracle Database Error Help. Browse the full Oracle error list or search every database error.
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.