| |
microsoft.public.sqlserver.programming |
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 -- > That is, is it guaranteed that simultaneous INSERTs on other connections will not interrupt the > Thanks, > Mike
create table t(c1 int identity, c2 char(1))
WAITFOR TIME '16:19:05'
INSERT INTO t (c2)
SELECT TOP 1000 'a' FROM sysobjects, syscolumns
WAITFOR TIME '16:19:05'
INSERT INTO t (c2)
SELECT TOP 1000 'b' FROM sysobjects, syscolumns
WAITFOR TIME '16:19:05'
INSERT INTO t (c2)
SELECT TOP 1000 'c' FROM sysobjects, syscolumns
2005 with same results.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
> 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.
> sequence of identity values assigned.