Sdílet prostřednictvím


How to: Create Clustered Indexes (Visual Database Tools)

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 index key values. A table can contain only one clustered index.

To create a clustered index

  1. In Object Explorer, right-click the table for which you want to create a clustered index and click Design.

    The table opens in Table Designer.

  2. From the Table Designer menu, click Indexes/Keys.

  3. In the Indexes/Keys dialog box, click Add.

  4. Select the new index in the Selected Primary/Unique Key or Index list.

  5. In the grid, select Create as Clustered, and choose Yes from the drop-down list to the right of the property.

    The index is created in the database when you save the table.