A. If there are no foreign keys on the table then a simple TRUNCATE TABLE <tbl> will do the trick.
If there are foreign keys then first delete all rows - DELETE <tbl>
Then reset the identity :-
Under 7.0 - DBCC CHECKIDENT(<tbl>,RESEED,0)
Under 6.5 - DBCC CHECKIDENT(<tbl>)
0 comments
Hide comments