Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing PK from non-clustered to clustered
Message
 
General information
Forum:
Microsoft SQL Server
Category:
Other
Miscellaneous
Thread ID:
01637980
Message ID:
01638018
Views:
46
>I think originally this column was not INT but NUMERIC(6,0) and I later changed it to INT. Could this have confused SQL Server and caused the PK column to be non-clustered?

It all depends on how exactly you created that PK originally. By default SQL Server tries to make the PK column a clustered index if you do it using the designer. I don't think numeric(6) vs. integer would have made a difference.

Of course, it's easy to test - just create a new table with few columns and a numeric(6,0) column, set it to be a PK and then see what is the generated script. Then just don't save changes in the designer or if the table will be created, just drop it.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform