Could anyone explain the differences between clustered and a non-clustered indexes to me?. Please let me know if there are any specific requirements to be used in special cases. Thank you.
Could anyone explain the differences between clustered and a non-clustered indexes to me?. Please let me know if there are any specific requirements to be used in special cases. Thank you.
The difference is that, Clustered index is unique for any given table and we can have only one clustered index on a table. The leaf level of a clustered index is the actual data and the data is resorted in case of clustered index.
Whereas in case of non-clustered index the leaf level is actually a pointer to the data in rows so we can have as many non-clustered indexes as we can on the db.
Cluster index sorts the data with respect to the column on which it is applied, where as non-clustered index do not, it is just a logical sorting. Thus we can have only single clustered index and multiple non-clustered index on a table. Primary index on a table is clustered index. By default CREATE INDEX statement creates a non-clustered index
8 People are following this question.