The auto increment causes the column to always increase by 1. Either you delete an entire column or not the specific column will never take the same value again. So if for example u add 5 records the column with autoincrement will go from 1-5. Now if you delete those rows and u add new 5 , the auto increment column will start from 6.
You can choose autoincrement when you want to have a unique column in order to set a primary key. So if you really need it keep it like this and reset it with the way aneesh mentioned.
Main Topics
Browse All Topics





by: aneeshattingalPosted on 2008-01-15 at 22:07:54ID: 20669547
Hello doyle007,
in order to reset to 0 use
DBCC CHECKIDENT (UrTableName, RESEED, 0)
Aneesh R