updateAllIdentityValues.sql
--reset identity values to 0 if you have deleted a large number of rows and want to reset. Run again to update to current number of rows
USE [DB_NAME};
EXEC sp_MSforeachtable @command1 = 'PRINT ''?''; DBCC CHECKIDENT(''?'', RESEED)'
GO
Comments