Run this command to reset or reseed Identity columns of a table.
exec sp_MSforeachtable‘IF OBJECTPROPERTY(OBJECT_ID(”?”), ”TableHasIdentity”) = 1BEGIN DBCC CHECKIDENT (”?”,RESEED,0) END’
Once you run this query on a table it will reset Identity column always.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment