Adding and Deleting the Auto_Increment column and reseting

programming with the MySQL environment and PHP or other server side languages.
Post Reply
darknkreepy3#
Site Admin
Posts: 253
Joined: Tue Oct 27, 2009 9:33 pm

Adding and Deleting the Auto_Increment column and reseting

Post by darknkreepy3# »

I found when I made a database where I had a column, say, 'id' have AUTO_INCREMENT, I noticed 2 things:

1. when you delete a node in the list, a row, it does not remunerate them.
2. you can loop through all the table rows and just remunerate them.
3. finally, the pointer telling MySQL what number is next needs to be told:

find the largest integer in the key column 'id' and add+1 for the next item added.

otherwise you will notice it just keeps increasing to the amount of items you have totally added to the table.
Post Reply