Hello folks.
I have table with id ( index, auto_increment ) and when i delete row I want to reset the id.
It can be achieved with deleteing id and creating id every time with the same properties ( auto_increment ), but it is lame.
Ideas ?
Before we try to come up with some (possibly kludgy) solution to reset the auto-increment counter, may I ask why you feel it is necessary to do so? Normally such a column is used to provide a unique row ID field with a minimum memory footprint that is easy to implement. As such, it should not matter if there are gaps in the sequence.
Thanks, I decided not to reset the row ID because
NogDog wrote:Normally such a column is used to provide a unique row ID field with a minimum memory footprint that is easy to implement.
Normally such a column is used to provide a unique row ID field with a minimum memory footprint that is easy to implement.