Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 sql indexes

Author  Topic 

srinivas.sql
Starting Member

11 Posts

Posted - 2010-02-10 : 05:27:47
why only one clustered index can be created?

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-02-10 : 05:36:15
Clustered indexes sort and store the data rows in the table based on their key values. There can only be one clustered index per table, because the data rows themselves can only be sorted in one order.

see this:
http://msdn.microsoft.com/en-us/library/ms190639.aspx


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

laddu
Constraint Violating Yak Guru

332 Posts

Posted - 2010-02-11 : 12:41:59
Clustered index:- Reorders the way records in the table are physically stored. Therefore table can have only one clustered index.
The leafnodes of clustered index contain the data pages.Table and index are same

Non- clustered index:-In which the logical order of the index does not match the physical stored order of the rows on disk
The leafnode of non clustered index does not consist of the data pages. Instead , the leaf nodes contain index rows.
Table and index are different from each other

The biggest difference between a clustered index and a non-clustered index is that when you use a clustered index, the section of the table that comprises the index has its data pages linked differently from those data pages comprising a non-clustered index.
Go to Top of Page
   

- Advertisement -