sql reset identity increment code example
Example 1: sql server reset identity
DBCC CHECKIDENT ('table name', RESEED , 0)
Example 2: sql reset auto increment
ALTER TABLE tmp AUTO_INCREMENT = 3;
Example 3: sql server reset auto increment
DBCC CHECKIDENT (mytable, RESEED, 0)
Example 4: how to reset the identity column in sql server
USE <databasename>;
GO
DBCC CHECKIDENT ('<tablename>.<columnname>', <value>, <incrementby>);
GO