how to update a column which is a primary key - TechRepublic
General discussion
June 1, 2011 at 06:27 AM
jazzygodfrey

how to update a column which is a primary key

by jazzygodfrey . Updated 15 years, 1 month ago

I have a table that keeps information of organization’s members and each member is assigned a unique id, there are few members who for some reasons the organization has issued new id’s to them, now I have been asked to update their new id’s but SQL can not update them saying;
“Violation of PRIMARY KEY constraint ‘PK_members’. Cannot insert duplicate key in object ‘dbo.members’.”

how do i do this?

This discussion is locked

All Comments