Newsgroups: microsoft.public.sqlserver.programming
From: "Tibor Karaszi" <tibor_please.no.email_kara...@hotmail.nomail.com>
Date: Fri, 10 Feb 2006 16:21:31 +0100
Local: Fri 10 Feb 2006 15:21
Subject: Re: Guaranteed consecutive identity values
A quick test shows "no":
Create the table: From connection 1 (adjust time in WAITFOR): From connection 2 (adjust time in WAITFOR): From connection 3 (adjust time in WAITFOR): Then check the results. Order by c1 and you will the the "rows interleaved". I tried this in 200 and -- > 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 > Thanks, > Mike You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||