ORA-00933 SQL Origin: Data Last updated 14 Oct 2026

ORA-00933: SQL command not properly ended

Oracle found extra clauses or syntax it doesn’t support at the end of a statement.

Exact message you may see SQL command not properly ended
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

  1. Use FETCH FIRST n ROWS ONLY (12c+)
  2. Remove AS from table aliases
  3. Strip trailing semicolons in application SQL

Detailed fix by platform

SQL

  1. SELECT * FROM orders o ORDER BY created_at DESC FETCH FIRST 10 ROWS ONLY;

How to diagnose

  1. Statement — What follows the main clause?
  2. Recent change — Did it start after a deploy, upgrade, or configuration change? Compare with the last working version.

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Data. Errors that are often confused with or caused by this one (click to open):

102 — SQL Server: Incorrect syntax near 'x'. (Msg 102) (SQL)1021064 — MySQL ERROR 1064 (42000): You have an error in your SQL syntax (MySQL)10641136 — MySQL ERROR 1136 (21S01): Column count doesn't match value count at row 1 (SQL)11361248 — MySQL ERROR 1248 (42000): Every derived table must have its own alias (SQL)1248aggregate in WHERE — ERROR: aggregate functions are not allowed in WHERE (use HAVING) / MySQL 1111 Invalid use of group function (SQL)aggregate in WHEREambiguous column — Column reference is ambiguous / Column 'id' in field list is ambiguous (MySQL 1052) (SQL)ambiguous columnGROUP BY — Column must appear in the GROUP BY clause / isn't in GROUP BY (MySQL 1055 only_full_group_by) (SQL)GROUP BYORA-00001 — ORA-00001: unique constraint (SCHEMA.PK_X) violated (SQL)ORA-00001ORA-00933

Explore the map of this error Full error map →

🧠 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.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.