code_junkie

How do I reset an increment identity's starting value in SQL Server

Nov 10th, 2011
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.14 KB | None | 0 0
  1. DBCC CHECKIDENT('TableName', RESEED, 0)
  2.  
  3. DBCC CHECKIDENT (MyTable, RESEED, 0)
  4.  
  5. DBCC CHECKIDENT (MyTable, RESEED, 100)
  6.  
  7. TRUNCATE table
Add Comment
Please, Sign In to add comment