Microsoft
Software
Hardware
Network
Question : Updating an identity column
I have an ms sql server database table, with an identity column. What I need to do is to turn off identity and the update all rows then turn the identity back on. The column is also the primary key. can anyone assist?
Answer : Updating an identity column
Use SET IDENTITY_INSERT to allow updates/inserts to the identity column.
set identity_insert tbl on;
update tbl set idcol = somenewformula;
set identity_insert tbl off;
Random Solutions
Programmatically get bookmarks from PDF file
mac mail client exchange email problems
Best practices in building test harness
Shadowing/Overriding in C#
Invalid object reference error
How to set a number of lines on a report
Access VBA to stop all macros
EtherChannel on Cisco 2960 switch intermittent dropped packet
subquery returned more than 1 value: database vendor code 512
New install of SBS 2008 continuously downloads 2.5GB per day (WSUS disabled)