Click here to Skip to main content
15,899,023 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have clustered index on primary key ID column. Now i need to
drop clustered index (i want to create new clustered index on another column), but retain primary key on ID column. Is it possible?
How?
Posted
Comments
Tomas Takac 17-May-15 7:14am    
SQL server? What's the problem? You don't know how to drop primary key? or how to create non-clustered primary key?

1 solution

1. Drop existing primary key
2. Create new - non-clustered - primary key, using: ALTER TABLE [Table] ADD CONSTRAINT [PK_Name] PRIMARY KEY NONCLUSTERED (PK_Column)
3. Create other - clustered - index
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900