Re: Cannot update identity column

From: Anith Sen (anith_at_bizdatasolutions.com)
Date: 02/04/05


Date: Fri, 4 Feb 2005 12:17:31 -0600


>> You can update an identity by using the SET IDENTITY_INSERT ON / OFF
>> function before the update.

Are you sure?

Identity columns are non-updateable. The only way one could alter the
identity column value is to delete and insert the same data within a single
transaction. But then, any existing references on this column could all be
messed up.

-- 
Anith 


Relevant Pages

  • Insert Into without identity columns
    ... The problem I had is that we do not use identity columns. ... alter table #jwe1 ... alter table #jwe2 ...
    (microsoft.public.sqlserver.programming)
  • Re: Cannot update identity column
    ... > Identity columns are non-updateable. ... The only way one could alter the ... Talking about updates and inserts before coffee is a bad idea. ... David Gugick ...
    (microsoft.public.sqlserver.programming)
  • Re: Locking and Delay in a Bottleneck
    ... of course, in a database, there can be many Identity columns. ... SQL Server MVP ... the saving transaction, this journal voucher is having a header table ... number in a table whereupon you commit. ...
    (microsoft.public.sqlserver.programming)
  • Re: ado.net tricky transaction question
    ... > I think I do understand the identity columns and usage however my ... > into the database within a transaction am I able to do this within ... If you are using a second connection ... each window is a seperate connection. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: SQL Server 2000: Identity columns guaranteed sequential?
    ... identity columns are not guaranteed to have no ... INSERT transaction A is assigned 301 ... absolutely need to guarantee that, then you'll have to go with setting ... keep in mind that any rollbacks will leave gaps in the identities. ...
    (microsoft.public.sqlserver.server)