What is the difference between clustered and non-clustered index?

Category: SQLWhat is the difference between clustered and non-clustered index?
Editor">Editor Staff asked 2 years ago

What is the difference between clustered and non-clustered index?

1 Answers
Editor">Editor Staff answered 2 years ago

clustered index is an index that rearranges the table in the order of the index itself. Its leaf nodes contain data pages. A table can have only one clustered index.
A non-clustered index is an index that does not re-arrange the table in the order of the index itself. Its leaf nodes contain index rows instead of data pagesA table can have many non-clustered indexes.