|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Thursday, April 25, 2013 7:03 AM
Points: 292,
Visits: 148
|
|
| If we are not mention any index for primary key , then Clustered index created for Primary key (by default). In this question, primary key created with out any specification, So Clustered index is the right answer, correct?
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Today @ 3:03 PM
Points: 5,244,
Visits: 7,061
|
|
subrammail (6/27/2012) If we are not mention any index for primary key , then Clustered index created for Primary key (by default). In this question, primary key created with out any specification, So Clustered index is the right answer, correct? Almost correct, but not completely.
If the CREATE TABLE also includes a UNIQUE constraint, and the declaration of that UNIQUE constraint includes the CLUSTERED keyword to override the default kind of index for a UNIQUE constraint, then the index for the primary key will default to nonclustered (because there can only be one clustered index).
Hugo Kornelis, SQL Server MVP Visit my SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis
|
|
|
|
|
SSC-Addicted
      
Group: General Forum Members
Last Login: Monday, April 15, 2013 11:42 PM
Points: 424,
Visits: 55
|
|
|
|
|