Reset Identity to some value

Hi

I have a column that is auto-incremented, how do I reset its incremental value to 30 for example?

I need an SQL syntax for that. and the database that this column is in is of MS SQL 2000
alfardanAsked:
Who is Participating?
 
openshacConnect With a Mentor Commented:
DBCC CHECKIDENT (mytable, RESEED, 30)
0
 
openshacCommented:
You might want to check the current identity value first:

DBCC CHECKIDENT ('mytable', NORESEED)
0
 
tbsgadiCommented:
Have a look at the following:

http://technet.microsoft.com/en-us/library/ms176057.aspx

Good Luck!

Gary
0
All Courses

From novice to tech pro — start learning today.