I have a database using Derby and am trying to execute an update statement on a table that has a column with “GENERATED BY DEFAULT AS IDENTITY”. I am not trying to update this column, but all of the others.
I can’t seem to find the correct syntax to update the rest of the columns without getting errors such as “Attempt to modify an identity column”.
Trying to update the table I have been using the UPDATE command,
UPDATE TableName SET Name = '...', ..., WHERE Name = '...'
The first value within the table is an ID field that has the GENERATED BY DEFAULT AS IDENTITY design and I don’t want to update this value, I just want to update all of the other fields within the UPDATE command. I don’t know how to skip updating this value or simply update the ID field with itself.
Thanks in advance.
So, here’s what I did; it worked fine. Can you identify what you are doing differently than this?