Very nice question indeed. Guess what sould be the output of the last select statement, If I add a TRUNCATE statement in the code as well:
CREATE TABLE IdentTest
( Ident INT NOT NULL IDENTITY (1,1)
, varfield varchar(100)
)
INSERT INTO IdentTest VALUES ('abc')
DBCC CHECKIDENT ('IdentTest',RESEED,100)
INSERT INTO IdentTest VALUES ('abc')
TRUNCATE TABLE identTest
INSERT INTO IdentTest VALUES ('abc')
SELECT Ident FROM IdentTest
~ Lokesh Vij
Link to my Blog Post --> www.SQLPathy.com[/url]
Follow me @Twitter