ORA-00923: FROM keyword not found where expected
Oracle reached the end of what it thought was the select list without finding FROM: often a missing comma, a bad alias, a quote problem or SELECT without FROM.
- Error code
ORA-00923- Category
- Syntax and SQL statements
What it means
After SELECT and the column list, Oracle expects FROM. ORA-00923 means something in or after the select list stopped it from getting there.
Common causes
- A missing comma between two columns, so the second is read as an alias and the third is unexpected.
- A column alias with spaces or a reserved word, not in double quotes.
- Single quotes around an alias (
AS 'Total'); aliases use double quotes. SELECT 1with noFROMon releases before 23ai, which needFROM dual.
How to fix it
-
Check commas in the select list and quote aliases with double quotes.
SELECT first_name, last_name, salary * 12 AS "Annual Salary" FROM hr.employees;
-
Select constants from
dualon releases before 23ai.SELECT SYSDATE FROM dual;
Related errors
More syntax and sql statements errors
ORA-00907missing right parenthesisORA-00911invalid characterORA-00917missing commaORA-00918column ambiguously definedORA-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.