MS SQL Server Concepts and Programming Question:
Download Questions PDF

What Is the Difference Between Clustered and Non-Clustered Indexes in MS SQL Server?

Answer:

SQL Server 2005 supports two types of indexes: clustered index and non-clustered index. Here are the main differences between them:

* One table can only have only one clustered index.
* One table can only have many non-clustered index.
* A clustered index requires no separate storage than the table storage. It forces the rows to be stored sorted on the index key.
* A non-clustered index requires separate storage than the table storage to store the index information.
* A table with a clustered index is called clustered table. Its rows are stored in a B-Tree structure sorted.
* A table without any clustered indexes is called non-clustered table. Its rows are stored in heap structure unsorted.
* The default index created as part of the primary key column is a clustered index.


Download MS SQL Server Interview Questions And Answers PDF

Previous QuestionNext Question
Does the UNIQUE Constraint Create an Index?How To Create a Large Table with Random Data for Index Testing in MS SQL Server?