Google Mail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Message from discussion Guaranteed consecutive identity values

View Parsed - Show only message text

From: "Dave Frommer" <a...@spam.com>
References: <epPcMElLGHA.4064@TK2MSFTNGP10.phx.gbl>
Subject: Re: Guaranteed consecutive identity values
Date: Fri, 10 Feb 2006 10:20:09 -0500
Lines: 20
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
Message-ID: <#L$JkWlLGHA.2668@tk2msftngp13.phx.gbl>
Newsgroups: microsoft.public.sqlserver.programming
NNTP-Posting-Host: adsl-19-63-241.asm.bellsouth.net 68.19.63.241
Path: g2news1.google.com!news2.google.com!news4.google.com!newshub.sdsu.edu!msrtrans!TK2MSFTNGP08.phx.gbl!tk2msftngp13.phx.gbl

No, that is not guaranteed.

"Michael Abraham" <mabraha...@newsgroup.nospam> wrote in message 
news:epPcMElLGHA.4064@TK2MSFTNGP10.phx.gbl...
> If I do a INSERT INTO <table> SELECT ... and <table> has an identity 
> column with an increment equal to 1, does SQL/Server 2000 and/or 
> SQL/Server 2005 guarantee that the identity values generated for a single 
> successful INSERT of this type will be consecutive.  So if I do an INSERT 
> INTO ... SELECT which inserts, for example, 17 rows, am I guaranteed that 
> the identity values assigned will be N, N+1, N+2, ..., N+16.
>
> That is, is it guaranteed that simultaneous INSERTs on other connections 
> will not interrupt the sequence of identity values assigned.
>
> Thanks,
>
> Mike
> 



Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google