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