when i remove primary key constraint then SQL automatically remove the cluster index and
same for unique it will remove non-cluster index ?
when i remove primary key constraint then SQL automatically remove the cluster index and
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
A table can have at most one clustered index. The clustered index is the table. The clustered index is removed (the table is turned into a heap) when the clustered index is dropped. The primary key is not necessary the clustered index, but it usually is. The unique constraint/index in question may or may not remove a clustered index depending whether is was or it was not a clustered index.
Updated:
I think I misred the question. If you drop a unique constraint, it will remove the corresponding non-clustred index, yes.