In Microsoft® SQL Server™ databases you can create a clustered index. In a clustered index, the physical order of the rows in the table is the same as the logical (indexed) order of the key values. A table can contain only one clustered index. UPDATE and DELETE operations are often accelerated by clustered indexes because these operations require large amounts of data to be read.
Consider using a clustered index for:
state
column that contains only 50 unique state codes.You can also use a clustered index to control what happens when a duplicate key or duplicate row is created as a result of adding or updating data to the indexed table (with the INSERT or UPDATE statement).
To create a clustered index
To modify an existing index, select the index from the Selected index list.
Option | Treatment of duplicate rows |
Disallow duplicate rows | The default option. If duplicate rows exist, the index cannot be created when you attempt to save the table. |
Ignore duplicate rows | If duplicate rows exist, the index is created but duplicate rows are deleted when you save the table. When new rows are inserted, duplicates are not accepted and a SQL Server error appears when you attempt to save the table. |
Allow duplicate rows | Duplicate rows are accepted in new and existing data. |
The index is created in the database when you save the table or diagram.