Create procedure DeleteTest(@ID int)
as
begin
declare @cnt int
— delete current record
delete from newTest where id=@ID
— reset identity value to the total records in the table
select @cnt = isnull(max(ID),0) from newTest
DBCC CHECKIDENT ( ‘dbo.newTest’, RESEED, @cnt)
————-
For your reference http://msdn2.microsoft.com/en-us/library/ms176057.aspx