Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

set auotincrement to 0

Status
Not open for further replies.

theogary

Programmer
Mar 3, 2003
99
US
I want to reset autoincremnt to zero

I am munipalting a table daily and my autoincrent id is way to high

I want the id to match the number of actual records.
 
Setting the auto_increment counter will not give you that.

In fact, if you reset the counter to a small number and you add a record that would have an auto_increment column value that matches an existing column value, you'll get "duplicate index" error on inserts.





Want the best answers? Ask the best questions!

TANSTAAFL!!
 
I want the id to match the number of actual records.
The only thing that sutonumber does is make sure an id does not match an existing id. Something seems amiss here.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top