How many clustered indexes there can be in one table?

后端 未结 5 1292
小鲜肉
小鲜肉 2021-02-02 08:31

In SQL Server 2008, how many clustered indexes there can be in one table?

5条回答
  •  孤独总比滥情好
    2021-02-02 09:15

    1.

    Although there are certain reasons for it, it may seem a little strange that only one clustered index is permitted. The fact that the clustered index sorts the data internally doesn't really explain the reason for only having one such index because nonclustered indexes are sorted in exactly the same way as clustered ones. Nonclustered indexes can include all the data of a table in the same way that a clustered one does. So in at least some cases it could be quite reasonable to create multiple "clustered" indexes or simply to do away with the distinction altogether. But SQL Server won't allow you to create more than one.

提交回复
热议问题