This will help you:
declare @MaxId=(select max(id) from table_name) DBCC CHECKIDENT ('table_name', RESEED, @MaxId);