tech on the net
Home About Us Feedback Site Map

Microsoft

Access Excel Word

Database

SQL Oracle / PLSQL SQL Server MySQL MariaDB PostgreSQL

Web Development

HTML CSS Color Picker

Language

C Language

More

ASCII Table Linux UNIX Java Clipart Joke of the Moment
Share this page:

Oracle/PLSQL: ORA-00911

Learn the cause and how to resolve the ORA-00911 error message in Oracle.

Description

When you encounter an ORA-00911 error, the following error message will appear:

  • ORA-00911: invalid character

Cause

You tried to execute a SQL statement that included a special character.

Resolution

The option(s) to resolve this Oracle error are:

Option #1

This error occurs when you try to use a special character in a SQL statement. If a special character other than $, _, and # is used in the name of a column or table, the name must be enclosed in double quotations.

Option #2

This error may occur if you've pasted your SQL into your editor from another program. Sometimes there are non-printable characters that may be present. In this case, you should try retyping your SQL statement and then re-execute it.

Option #3

This error occurs when a special character is used in a SQL WHERE clause and the value is not enclosed in single quotations.

For example, if you had the following SQL statement:

SELECT * FROM suppliers
WHERE supplier_name = ?;

You would receive the following error message:

Oracle PLSQL

You could correct this error by enclosing the ? in single quotations as follows:

SELECT * FROM suppliers
WHERE supplier_name = '?';