MetricSign
Start free
Medium severitysql

Oracle Database Error:
ORA-00905

What does this error mean?

Oracle's SQL parser expected a keyword at a specific position but found something else, indicating a syntax error in the SQL statement.

Common causes

  • 1Missing INTO in an INSERT statement
  • 2Missing SET in an UPDATE statement
  • 3Non-Oracle JOIN syntax (e.g. CROSS APPLY, OUTER APPLY)
  • 4Using T-SQL-specific syntax in an Oracle query
  • 5Incorrect subquery or WITH clause structure

How to fix it

  1. 1Step 1: Log the exact SQL being executed and test it in SQL Developer or SQL*Plus.
  2. 2Step 2: Compare the failing statement against Oracle SQL syntax documentation.
  3. 3Step 3: Replace T-SQL or MySQL syntax with Oracle equivalents: CROSS APPLY → LATERAL, TOP N → FETCH FIRST N ROWS ONLY.
  4. 4Step 4: Validate the ADF query or stored procedure body if this is a code-gen issue.
  5. 5Step 5: Fix the SQL in the ADF dataset, stored procedure activity, or script activity.

Example log output

ORA-00905: missing keyword
SQL: INSERT orders (id, name) VALUES (1, 'test')

Frequently asked questions

Where does Oracle flag the position of the missing keyword?

Oracle points to the token it found instead of the expected keyword, not the position of what is missing. Read backwards from the flagged token to find the missing keyword.

Source · docs.oracle.com/error-help/db/ora-00905

Other sql errors