• 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/Data Platform MVP (2006-2016)
    Visit my SQL Server blog: https://sqlserverfast.com/blog/
    SQL Server Execution Plan Reference: https://sqlserverfast.com/epr/