I\'m using this code to reset the identity on a table:
DBCC CHECKIDENT(\'TableName\', RESEED, 0)
This works fine most of the time, with the f
Simply do this:
IF EXISTS (SELECT * FROM tablename) BEGIN DELETE from tablename DBCC checkident ('tablename', reseed, 0) END