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!

Renumber an AutoIncrement Field

Status
Not open for further replies.

james0816

Programmer
Jan 9, 2003
295
US
is it possible to renumber a field that is designated as autoicrement?

After several adds and deletes the numbering gets all wacky. I would like to renumber if possible to put it back in order.

thx
 
don't do it

the actual numbers should have no meaning

you should not need to worry about gaps in the numbers

if something in your application requires consecutive numbers, then you should not be using auto_increment for that purpose

r937.com | rudy.ca
 
The only way I know of is to delete that field and recreate it. However, if anything is referencing that field DON'T DO IT. If you delete and recreate and that field is being used, you've just found a reason to test you backup and restore process.

Like r937 said, don't do it. That's the best advice.
Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top