گروه فناوری پرند - Parand Tech Group

Reset Identity in SQL Server Tables of a Database

Run this command against your database:

exec sp_MSforeachtable 'IF OBJECTPROPERTY(OBJECT_ID(''?''), ''TableHasIdentity'') = 1 BEGIN DBCC CHECKIDENT (''?'',RESEED,0) END'

Print | posted on Sunday, February 14, 2010 7:47 AM

Comments on this post

No comments posted yet.

Your comment:

 (will show your gravatar)
 
Please add 8 and 1 and type the answer here: