T-SQL » Indexes » Renaming an Index

Syntax:
sp_rename 'table1.index_name', 'index_newname'
table1.index_name
The current name of the index.
index_newname
The new name for the index.

An index can be renamed with the sp_rename statement. An index can be renamed only if the index name is unique within the table.

Examples

Code:
sp_rename 'Students.Index_Name_Clstd_FF10', 'ClstdIndex_Name_FF10';
Output:
Caution: Changing any part of an object name could break scripts and stored procedures.
The index was renamed to 'ClstdIndex_Name_FF10'.
Explanation:

In the above example the name of the index, Index_Name_Clstd_FF10, is renamed to ClstdIndex_Name_FF10.

Language(s): MS SQL Server