Lab-verifiedReproduced and fixed on Oracle AI Database 26ai Free 23.26.3.0.0 · 2026-11-29 · container image gvenzl/oracle-free:23-slim
After SELECT Oracle reads columns until it expects FROM. When something else shows up there, it stops with ORA-00923. The * under the SQL in SQL*Plus marks the exact spot where it expected FROM.
The SELECT list itself is the problem, not the FROM clause. The three cases below are the ones that come up most in everyday queries.
01Column alias written in single quotes: AS 'Employee Name'
In Oracle, single quotes mean a string value. name AS 'Employee Name' puts a string where an alias name should be, and the * points at 'Employee Name'. This syntax works in MySQL and SQL Server, so it often comes with queries copied from them.
Setup
CREATE TABLE emp (id NUMBER PRIMARY KEY, name VARCHAR2(20), sal NUMBER);
INSERT INTO emp VALUES (1, 'Kim', 3000);
COMMIT;Table created.
1 row created.
Commit complete.SELECT name AS 'Employee Name', sal FROM emp;SELECT name AS 'Employee Name', sal FROM emp
*
ERROR at line 1:
ORA-00923: FROM keyword not found where expected
Help: https://docs.oracle.com/error-help/db/ora-00923/SELECT name AS "Employee Name" FROM emp;Employee Name
--------------------
Kim
1 row selected.Use double quotes for an alias with spaces or mixed case: name AS "Employee Name". The column header then shows Employee Name.
SELECT name AS "Employee Name", sal FROM emp;Employee Name SAL
-------------------- ----------
Kim 3000
1 row selected.02Missing comma between columns
SELECT empno ename sal FROM emp has no commas. Oracle reads empno ename as column empno with the alias ename, and then sal is a third word where FROM should be. The * points at sal.
Setup
CREATE TABLE emp (empno NUMBER PRIMARY KEY, ename VARCHAR2(20), sal NUMBER);
INSERT INTO emp VALUES (7369, 'SMITH', 800);
COMMIT;Table created.
1 row created.
Commit complete.SELECT empno ename sal FROM emp;SELECT empno ename sal FROM emp
*
ERROR at line 1:
ORA-00923: FROM keyword not found where expected
Help: https://docs.oracle.com/error-help/db/ora-00923/SELECT empno ename FROM emp; ENAME
----------
7369
1 row selected.The check SELECT empno ename FROM emp runs without error but shows the header ENAME over the number 7369: ename became an alias, not a column. So a missing comma can also give wrong results without any error. With commas, SELECT empno, ename, sal returns all three columns.
SELECT empno, ename, sal FROM emp; EMPNO ENAME SAL
---------- -------------------- ----------
7369 SMITH 800
1 row selected.03Missing || when joining strings
SELECT last_name ' ' first_name tries to join columns and a space, but without the || operator Oracle sees a string right after a column. The * points at ' '.
Setup
CREATE TABLE emp (id NUMBER PRIMARY KEY, first_name VARCHAR2(20), last_name VARCHAR2(20));
INSERT INTO emp VALUES (1, 'Minsu', 'Kim');
COMMIT;Table created.
1 row created.
Commit complete.SELECT last_name ' ' first_name AS full_name FROM emp;SELECT last_name ' ' first_name AS full_name FROM emp
*
ERROR at line 1:
ORA-00923: FROM keyword not found where expected
Help: https://docs.oracle.com/error-help/db/ora-00923/SELECT last_name || ' ' || first_name AS full_name FROM emp;FULL_NAME
-----------------------------------------
Kim Minsu
1 row selected.Put || between each part: last_name || ' ' || first_name. The result is Kim Minsu.
SELECT last_name || ' ' || first_name AS full_name FROM emp;FULL_NAME
-----------------------------------------
Kim Minsu
1 row selected.FAQ
What does ORA-00923 FROM keyword not found where expected mean?
Oracle expected FROM at the position marked with *, but found something else. Check the SELECT list just before that spot: a quoted alias, a missing comma, or a missing ||.
Why does AS 'alias' give ORA-00923 in Oracle?
Single quotes are for string values. Write the alias without quotes, or with double quotes if it has spaces: AS "Employee Name".
Why does SELECT col1 col2 work but return the wrong column?
Without a comma, col2 becomes an alias for col1. With one more word after it you get ORA-00923; with exactly two words there is no error, only a wrong header.
How do I concatenate columns in Oracle SELECT?
Use ||: last_name || ' ' || first_name. Writing the parts next to each other without || gives ORA-00923.
How we verify
Each scenario starts from fresh database users. A script runs the setup, confirms the exact error code, applies the fix and runs the statement again. The output shown is what the database printed, saved by the script.
lab_a and lab_b are ordinary users created for the test; system is the DBA account. Oracle AI Database 26ai Free Release 23.26.3.0.0 - Develop, Learn, and Run for Free 23.26.3.0.0