VanillaGranilla icon

updateAllIdentityValues.sql

VanillaGranilla | PRO | 01/15/15 10:50:21 PM UTC | 0 ⭐ | 366 👁️ | Never ⏰ | []
SQL |

240 B

|

None

|

0 👍

/

0 👎

--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