Archive for July, 2019

Reset the Autoincrement column in MSSQL

Wednesday, July 24th, 2019

To reset the identity column in MSSQL use the following:

DBCC CHECKIDENT (tablename, RESEED, 0)

Just replace tablename with the table, and change the 0 to the number minus 1 that you want to have as the next row.

For example, entering 0 (zero) will give the next row identity of 1.

Tags: