Skip to content
Home » Oracle Database » How to Resolve ORA-00953: missing or invalid index name

How to Resolve ORA-00953: missing or invalid index name

ORA-00953

Tried to create an index for a table, but it failed with ORA-00953.

Reserved Word

SQL> create index update on products (patch_date);
create index update on products (patch_date)
             *
ERROR at line 1:
ORA-00953: missing or invalid index name

Begin with Digit

SQL> create index 21c on products (patch_date);
create index 21c on products (patch_date)
             *
ERROR at line 1:
ORA-00953: missing or invalid index name

ORA-00953 means that the identifier you chose cannot be used for the index name, which is invalid and unqualified for an object name in Oracle database.

Which means, don't use any reserved words, don't use names begin with a digit either.

Solution

To have a qualified object name, you need to conform to the Oracle Database Object Names and Qualifiers.

SQL> create index update21c on products (patch_date);

Index created.

If you really want to name an object by a keyword or beginning with a digit, you should use double quotations to enclose its name. To better understanding how to properly use a quoted identifier (exact form), we have some examples for you.

For more error patterns about invalid identifier, you may refer to the post: How to Resolve ORA-00903: invalid table name.

Leave a Reply

Your email address will not be published. Required fields are marked *