Skip to content
Home » Oracle » How Oracle Rename Index

How Oracle Rename Index

ALTER INDEX RENAME TO

Traditional ALTER INDEX statement is able to rename the index.

Login as Owner

You can change the index name by the owner.

SQL> show user
USER is "HR"
SQL> ALTER INDEX emp_emp_id_pk RENAME TO emp_id_pk;

Index altered.

Login as Other User

This operation can be done by other user as long as you qualify the index with its schema name for the first one.

SQL> show user
USER is "SYSTEM"
SQL> ALTER INDEX hr.emp_emp_id_pk RENAME TO emp_id_pk;

Index altered.

Although you can recreate an index with different name, we usually don't do it, because big indexes may take a long time to complete the creation.

Leave a Reply

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