Reset id column
I have a table and i need to insert data and delete data from the table but when i delete one data its id is also deleted i need to enter data in the id number in sequence. for example if i have 3 records and i have deleted third record from database then that data will not be inserted in 3rd number id, its id will be 4 but i want to insert it with the id 3.plz help me

Satyapriya NayakRank #47 · 31.5K reputationPosted Nov 25, 2013, 3:05 AM EST
Duplicate thread
http://www.c-sharpcorner.com/Forums/Thread/238840/reset-id-column.aspx
Jaganathan BantheswaranRank #170 · 14.1K reputationPosted Nov 25, 2013, 3:34 AM EST
Alter the table so that the table does not have the IDENTITY colum.
You have to manually increment the id value & insert into DB.
Omkar Mhaiskar33 reputationPosted Nov 25, 2013, 4:08 AM EST
Use following Code.
DBCC CHECKIDENT (TABLENAME, reseed, 0)
in the last section set the number from where you want to set identity.
Thanks And Regards,
Omkar.