Sql Server Reset Table Identity Value

If you want to reset identity value, just execute this command

declare @tableName varchar(100) = 'tableName';
declare @value int = 0;
DBCC CHECKIDENT (tableName , reseed, @value)

The next value will be 1, but you can choose any natural number.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *