Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase «««23456

Index defaults 1 Expand / Collapse
Author
Message
Posted Wednesday, June 27, 2012 1:42 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Thursday, May 8, 2014 9:38 AM
Points: 313, Visits: 163
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?
Post #1321724
Posted Wednesday, June 27, 2012 4:23 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 7:00 AM
Points: 5,930, Visits: 8,178
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
Post #1322206
Posted Thursday, August 9, 2012 8:34 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Monday, April 15, 2013 11:42 PM
Points: 424, Visits: 55
Great question!
Post #1342696
« Prev Topic | Next Topic »

Add to briefcase «««23456

Permissions Expand / Collapse