// Oracle error reference

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
Error message
FROM keyword not found where expected

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 1 with no FROM on releases before 23ai, which need FROM dual.

How to fix it

  1. 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;
  2. Select constants from dual on releases before 23ai.

    SELECT SYSDATE FROM dual;

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.