Renaming an Index

Visual Database Tools

Visual Database Tools

Renaming an Index

New indexes are automatically given system-defined names based on the database table name. If you create multiple indexes on a table, the index names are appended with "_1", "_2", and so on. You can rename an index as long as index names are unique within the table.

Note   When you create a primary key or unique constraint for a table, an index with the same name as the constraint is automatically created for the table. Because index names must be unique for a table, you cannot create or rename an index to have the same name as the primary key or unique constraint for the table.

To rename an index

  1. In your database diagram, select the table whose index you want to rename, right-click the table, and choose Properties from the shortcut menu.

    -or-

    Open the Table Designer for the table whose index you want to rename, right-click in the Table Designer, and choose Properties from the shortcut menu.

  2. Choose the Indexes/Keys tab.

  3. Select the index from the Selected index list.

  4. Type a new name in the Index name box. Make sure that it does not duplicate a name in the Selected index list.

The index is renamed in your diagram when you exit the Index name box. It is renamed in the database when you save the table or diagram.

See Also

Deleting an Index | Indexes | Saving, Displaying, and Updating an Index Definition