May 20, 2009 at 8:11 am
Hi masters,
I need to update some values of an identity column.
How can i do this in SQL Server 2000?
Tks,
Pedro
May 20, 2009 at 8:29 am
You can't UPDATE identity column using update command, but u can reseed the value using DBCC CHECKIDENT.
May 20, 2009 at 8:33 am
But in this case , i really need it.
I have to update several values of a column that as an identity key.
Can i drop the identity key, make the updates to the data and then recreate the identity column?
May 20, 2009 at 8:46 am
Is this ur Live or Test Database?
May 20, 2009 at 8:52 am
It's my real database.
I will send a script
May 20, 2009 at 9:34 am
You cannot update an identity column. If you absolutely need to change some values, delete the row and then reinsert it specifying the identity value (with identity insert on)
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
May 20, 2009 at 1:58 pm
Why do you need to update values?
Perhaps we have another solution for you.
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply