ALTER INDEX statement

Use the ALTER INDEX statement to change the clustering attribute of an existing index. This statement is an extension to the ANSI/ISO standard for SQL.

Syntax

(1)
Element Description Restrictions Syntax
index Name of the index to be altered Must exist Identifier

Usage

ALTER INDEX is valid only for indexes that the CREATE INDEX statement created explicitly. ALTER INDEX cannot modify an index on a temporary table, nor an index that the database server created implicitly to support a constraint.

You cannot change the collating order of an existing index. If you use ALTER INDEX to modify an index after the SET COLLATION statement of SQL has specified a non-default collating order, the SET COLLATION statement has no effect on the index.

The ALTER INDEX statement cannot reference a forest of trees index. For information on forest of trees indexes, see HASH ON clause.