470,632 Members | 1,992 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,632 developers. It's quick & easy.

Identity insert doubt

Hello,

How do I get SQL server 2000 to continue the sequence of identity
column values after I perform an insert into the table with the set
identity_insert <table name> on statement? Eg if I insert values into
the identity column with values 1-999, how do I get the next number to
be 1000? Can the identity seed value be changed if there are records in
the table? Can the identity seed value be re-set to start again from 1?
Thanks
Isaac

Jul 20 '05 #1
3 1988
IDENTITY will automatically take the next number after the highest value
inserted when you turn IDENTITY_INSERT off again. Use DBCC CHECKIDENT to
change the IDENTITY seed value at any time.

--
David Portas
SQL Server MVP
--
Jul 20 '05 #2
DBCC CHECKIDENT(<TableName>, RESEED)

Jul 20 '05 #3
Thank you David and Dishan. Using DBCC CHECKIDENT worked just fine.
Dishan Fernando wrote:
DBCC CHECKIDENT(<TableName>, RESEED)


Jul 23 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Edward | last post: by
3 posts views Thread by Srini | last post: by
6 posts views Thread by Who.Really.Really.Cares | last post: by
9 posts views Thread by Micheal | last post: by
15 posts views Thread by gunnar.sigurjonsson | last post: by
13 posts views Thread by PinkBishop | last post: by
reply views Thread by Frank Swarbrick | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.