I'm working with a table with two primary keys (ID, Product_code). When I update product_code to a different value and try to insert a new record with the same primary key combination as the record had before the update I'm getting a pk duplication error. Is there some reason that the table would retain that primary key combination even after updating.
Example:
update Subscriptions set Product_Code = 'annual' where ID = 221226 and product_code = 'rm'
insert into subscriptions (product_code, ID) values ('rm',221226)
the insert will return pk error. What am I missing.