Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

changing a primary key value

i have a table that has 3 fields as primary key.
is it possible for me to change the value of one
of the primary key.

i am using the UPDATE statement but since
one of the data i am updating is also the PK
i am encountering an error.

isnt it possible to change a data if it is one of the
primary keys ??
[340 byte] By [ysabelle] at [2007-11-11 10:03:35]
# 1 Re: changing a primary key value
What kind of database are you using? Please post your SQL and the error message you're getting.
Phil Weber at 2007-11-11 23:43:36 >
# 2 Re: changing a primary key value
Primary key fields are typically not updated because this can affect data integrity. If one of the columns needs to be updateable then it should be removed from the primary key.
pclement at 2007-11-11 23:44:36 >