OracleORA-00933
ORA-00933: SQL Command Not Properly Ended
ORA-00933 occurs when Oracle's parser reaches the end of the SQL statement but the statement is syntactically incomplete or contains a clause that is not supported for the given SQL command.
Example Query
UPDATE employees SET salary = 5000 ORDER BY employee_id; -- Oracle does not support ORDER BY in UPDATE
Common Causes
- 1Using ORDER BY or LIMIT in an UPDATE or DELETE (not supported in Oracle)
- 2Extra semicolon or keyword at the end of the statement
- 3MySQL-specific syntax (e.g. LIMIT) used in an Oracle database
How to Fix It
Remove unsupported clauses like ORDER BY and LIMIT from UPDATE/DELETE. Use a subquery to target specific rows: UPDATE employees SET salary = 5000 WHERE employee_id IN (SELECT employee_id FROM employees WHERE … ORDER BY …).
Need a reliable database?
Try Supabase — free PostgreSQL with a generous free tier. No credit card required.
Got a query causing this error?
Paste it into SQLbuddy and get an instant plain-English explanation with optimization tips.
Analyze My Query →