PRIMARY KEY NONCLUSTERED and UNIQUE CLUSTERED INDEX on the same Column

  • Hello,

    Quick question on Index on a table.

    If I have a table with a primary key col ID that is created as "PRIMARY KEY NONCLUSTERED" and also has a "UNIQUE CLUSTERED INDEX" on it;

    isn't it redundant? Wouldn't one serve the purpose?

    Thanks.

  • Yes, the Primary Key might as well be used as the clustered index in that case. The only thing it does is give you versatility for later, in case you decide you need a different clustered index you won't have to regenerate the PK's NC index.


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • ok, thanks, Craig.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply