Sometimes we delete rows from a table and the identity will not start as expected from one, it would assign a random value. In order to reset the value we have to use the following command.
DBCC CHECKIDENT ('[TableName]', RESEED, 0);
GO
I am writing my experiences and learning to help others
Sometimes we delete rows from a table and the identity will not start as expected from one, it would assign a random value. In order to reset the value we have to use the following command.
DBCC CHECKIDENT ('[TableName]', RESEED, 0);
GO