ORA-00933: SQL command not properly ended
Oracle found extra clauses or syntax it doesn’t support at the end of a statement.
Seen on:
SQL
Meaning
Classic causes: LIMIT (use FETCH FIRST), AS before table aliases, a trailing semicolon sent through JDBC/drivers, or JOIN syntax errors.
Common causes
- LIMIT clause (MySQL syntax)
- AS keyword for table aliases
- Trailing semicolon in driver SQL
- ORDER BY in subqueries/inserts
⚡ Quick fix
- Use FETCH FIRST n ROWS ONLY (12c+)
- Remove AS from table aliases
- Strip trailing semicolons in application SQL
Detailed fix by platform
SQL
SELECT * FROM orders o ORDER BY created_at DESC FETCH FIRST 10 ROWS ONLY;
How to diagnose
- Statement — What follows the main clause?
- Recent change — Did it start after a deploy, upgrade, or configuration change? Compare with the last working version.
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 2 Oct 2026