Renaming indexes

You can use the RENAME statement to rename an existing index.

About this task

When renaming an index, the source index must not be a system-generated index.

Procedure

To rename an existing index, issue the following statement from the command line:
    RENAME INDEX source_index_name TO target_index_name

source_index_name is the name of the existing index that is to be renamed. The name, including the schema name, must identify an index that exists in the database. It must not be the name of an index on a declared temporary table or on a created temporary table. The schema name must not be SYSIBM, SYSCAT, SYSFUN, or SYSSTAT.

target_index_name specifies the new name for the index without a schema name. The schema name of the source object is used to qualify the new name for the object. The qualified name must not identify an index that exists in the database.

Results

If the RENAME statement is successful, the system catalog tables are updated to reflect the new index name.