Dec 24

Written by: Soul Solutions
Monday, 24 December 2007 

BronwenWeeGo.jpgHere's one I always have to look up. You've cleared out all the data in your tables and you want to set the autoid back to the beginning...or you want to start it at a particular number. DBCC CHECKIDENT is the command for you.

E.g.

command signature: DBCC CHECKIDENT(table_name, RESEED, new_value)
usage: DBCC CHECKIDENT(Customers, RESEED, 0)

Tags:

Your name:
Your email:
(Optional) Email used only to show Gravatar.
Your website:
Title:
Comment:
Security Code
Enter the code shown above in the box below
Add Comment   Cancel 
Copyright © 2002-2009 Soul Solutions Pty Ltd. | Login