Lab-verifiedReproduced and fixed on Oracle AI Database 26ai Free 23.26.3.0.0 · 2026-11-30 · container image gvenzl/oracle-free:23-slim
ORA-00922 is a parse error in DDL such as CREATE USER or CREATE TABLE. Oracle read the statement up to a point and then met something that is not a valid option there. Nothing is created.
The * under the statement marks where parsing stopped, so look there first: in our runs it pointed at the @ in a password, at TABLE after CREATE OR REPLACE, and at ENGINE. Below are the three cases reproduced on Oracle 26ai Free, each with the statement that then ran successfully.
01A password with @ (or another special character) without double quotes
CREATE USER app_user IDENTIFIED BY Pass@123; fails, and the * points at @. An unquoted password follows the same rules as an identifier, so Oracle reads Pass as the password and does not know what @123 is.
A check on dba_users returned 0: the user was not created. Wrapping the password in double quotes, IDENTIFIED BY "Pass@123", gave User created.
Setup
DROP USER IF EXISTS app_user CASCADE;User dropped.CREATE USER app_user IDENTIFIED BY Pass@123;CREATE USER app_user IDENTIFIED BY Pass@123
*
ERROR at line 1:
ORA-00922: missing or invalid option
Help: https://docs.oracle.com/error-help/db/ora-00922/SELECT COUNT(*) AS user_exists FROM dba_users WHERE username = 'APP_USER';USER_EXISTS
-----------
0
1 row selected.Double-quoted passwords are case-sensitive and must be typed exactly as written when connecting.
CREATE USER app_user IDENTIFIED BY "Pass@123";
DROP USER app_user;User created.
User dropped.02CREATE OR REPLACE TABLE (not supported for tables)
CREATE OR REPLACE TABLE emp_tmp (...) fails with the * under TABLE. Oracle accepts OR REPLACE for views, procedures and similar objects, but not for tables, even on 26ai.
Drop the table first and create it again: DROP TABLE IF EXISTS emp_tmp; then CREATE TABLE emp_tmp (...) returned Table created. Dropping a table deletes its data, so copy anything you need to keep first.
Setup
CREATE TABLE emp_tmp (id NUMBER, name VARCHAR2(20));Table created.CREATE OR REPLACE TABLE emp_tmp (id NUMBER, name VARCHAR2(50));CREATE OR REPLACE TABLE emp_tmp (id NUMBER, name VARCHAR2(50))
*
ERROR at line 1:
ORA-00922: missing or invalid option
Help: https://docs.oracle.com/error-help/db/ora-00922/DROP TABLE IF EXISTS emp_tmp;Table dropped.CREATE TABLE emp_tmp (id NUMBER, name VARCHAR2(50));Table created.03MySQL table options (ENGINE=InnoDB DEFAULT CHARSET=...) run on Oracle
A CREATE TABLE copied from MySQL ends with ENGINE=InnoDB DEFAULT CHARSET=utf8mb4. Oracle has no such table options, so it failed at line 4 with the * under ENGINE. The column part was fine, but user_tables showed the table was not created (0).
Removing everything after the closing parenthesis gave Table created. If the MySQL DDL also had a table COMMENT='...', write it as a separate COMMENT ON TABLE members IS '...'; (it returned Comment created.).
CREATE TABLE members (
id NUMBER PRIMARY KEY,
name VARCHAR2(50)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
*
ERROR at line 4:
ORA-00922: missing or invalid option
Help: https://docs.oracle.com/error-help/db/ora-00922/SELECT COUNT(*) AS table_exists FROM user_tables WHERE table_name = 'MEMBERS';TABLE_EXISTS
------------
0
1 row selected.CREATE TABLE members (
id NUMBER PRIMARY KEY,
name VARCHAR2(50)
);
COMMENT ON TABLE members IS 'member master';Table created.
Comment created.FAQ
How do I find what caused ORA-00922?
Look at the * that SQL*Plus prints under the statement and the line number in ERROR at line N. The token at the * is the one Oracle rejected.
How do I use special characters like @ in an Oracle password?
Put the password in double quotes: IDENTIFIED BY "Pass@123". Without quotes the statement fails with ORA-00922.
Does Oracle support CREATE OR REPLACE TABLE?
No. It fails with ORA-00922 on 26ai too. Use DROP TABLE IF EXISTS and then CREATE TABLE. Copy the data first if you need it.
Why does ENGINE=InnoDB give ORA-00922 in Oracle?
ENGINE and DEFAULT CHARSET are MySQL-only table options. Remove them from the CREATE TABLE and the statement runs.
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