Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Primary Keys and Clustered Indexes
Message
General information
Forum:
Microsoft SQL Server
Category:
Database design
Miscellaneous
Thread ID:
00462472
Message ID:
00462857
Views:
10
SQL Server will default to a Clustered index for PK constraints unless a Clustered index already exists on the table.

-Mike

>I am having a problem creating a PK constraint on an existing table. It seems as though whenever I create a PK constraint, SQL Server wants to make it a clustered index. From the BOL, I thought I could do this:
>
>ALTER TABLE Exchange
> ADD CONSTRAINT PK_ExchangeID PRIMARY KEY (ExchangeID) NONCLUSTERED
>
>But SQL Server won't let me do this. It always wants to make it a CLUSTERED index. Any ideas?
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Previous
Reply
Map
View

Click here to load this message in the networking platform