ORA-00911: invalid character
The statement contains a character Oracle cannot accept at that point. In practice this is often a curly quote pasted from Word, Outlook or a web page, or an invisible character. Retype the quotes and the part around the error.
What ORA-00911 means
SQL identifiers and punctuation accept a limited set of characters. When the parser meets anything else outside a string literal, it stops with ORA-00911. Text copied from documents is the classic source: the statement looks correct on screen, but ‘ and ’ are not the same as the straight quote '.
Common causes of ORA-00911
- Curly quotes or long dashes copied from Word, Outlook, Teams or a web page.
- Invisible characters such as a non-breaking space.
- An identifier starting with a digit or containing characters like
-without double quotes. - Characters from another tool’s syntax, such as a backtick around a name.
How to fix ORA-00911
- Retype the quotes by hand instead of pasting them.
- Paste the statement into a plain text editor and look at the position the error reports.
- Put unusual identifiers in double quotes, or better, rename them.
- If your SQL comes from a document, turn off smart quotes there.
ORA-00911 example
Curly quotes look almost the same as straight ones:
-- ORA-00911: invalid character
SELECT ‘a’ FROM dual;
-- Works
SELECT 'a' FROM dual;
In SQLlightspeed
When a statement fails, SQLlightspeed’s error panel shows the error code with a plain-language explanation and a suggestion for what to do next, together with Oracle’s own message and a link to Oracle’s documentation — for this error and dozens of other common ones.
Related errors
ORA-00933ORA-00936ORA-00904 All Oracle errors →
Oracle documentation for ORA-00911. Oracle is a registered trademark of Oracle Corporation. SQLlightspeed is not affiliated with Oracle.