Reset AutoIncrement field in SQL Server 2008 R2 / 2013

Solution:

Applied to: Microsoft SQL Server 2008 R2 and Microsoft SQL Server 2012 (but it’s similar for the other).

To reset auto incremental field in SQL Server you have to execute the following query:

DBCC CHECKIDENT (mytable, RESEED, 0)

Best Regards,

ITquadro – specialized Blog

ITquadro consulenti informatici specializzati in ambienti microsoft sql server. Ci trovate su Bologna ed Emilia-Romagna ma anche su Milano e Roma.