ORA-00911 SQL Origin: Data OSI layer 7 · Application Last updated 18 Nov 2026

ORA-00911: invalid character

The statement contains a character Oracle doesn't accept, often a trailing semicolon from client code or a smart quote.

Exact message you may see ORA-00911: invalid characterinvalid character Oracle semicolonORA-00911: invalid character JDBCcx_Oracle ORA-00911
Seen on: Oracle Java Python

Meaning

Remove the trailing ; when sending a statement through JDBC/OCI/cx_Oracle, replace curly quotes or non-breaking spaces copied from documents, and don't start identifiers with _ or # unless quoted. Check hidden Unicode in the SQL text.

Common causes

  • Trailing semicolon passed through a driver
  • Smart quotes/non-breaking space
  • Invalid identifier character (@, $ start)
  • Parameter placeholder syntax of another DB
  • Hidden BOM

⚡ Quick fix

  1. Remove the trailing ; in driver calls
  2. Retype quotes/whitespace
  3. Use :name Oracle bind syntax

Detailed fix by platform

Python

  1. cur.execute("SELECT * FROM emp WHERE id = :id", id=7) # no trailing semicolon

How to diagnose

  1. Semicolon — In driver call?
  2. Quotes — Smart?
  3. Placeholder — Oracle style?

🔧 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):

156 — SQL Server Msg 156: Incorrect syntax near the keyword 'X' (SQL)156double quotes — "column" not found: double quotes mean identifiers, single quotes mean strings (SQL)double quotesORA-00001 — ORA-00001: unique constraint (SCHEMA.PK_X) violated (SQL)ORA-00001ORA-00018 — ORA-00018: maximum number of sessions exceeded (SQL)ORA-00018ORA-00907 — ORA-00907: missing right parenthesis (SQL)ORA-00907ORA-00933 — ORA-00933: SQL command not properly ended (SQL)ORA-00933ORA-00936 — ORA-00936: missing expression (SQL)ORA-00936ORA-00911

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.