I have a MS SQL 2005 database with a table Test with column ID. ID is a identity column. I have rows in this table and all of them have their corresponding ID autoincremented value.
Now I would like to change every ID in this table like this:
ID = ID + 1
But when I do this I get error:
Cannot update identity column 'ID'.
I've tried with:
ALTER TABLE Test NOCHECK CONSTRAINT ALL
set identity_insert ID ON
But this does not solve this problem.
I need to have identity set to this column, but I need to change values as well from time to time. So my question is how to acomplish this task that is required by my project.