PDA

View Full Version : auto increment in mysql



ketanco
03 Oct 2008, 09:37 PM
In mysql, my primary key is id column and it is autoincrement. sometimes i do a mistake when entering something and when i delete the last row, the utoincrement keeps counting for the next row. for example, if i delete the row with id =37, the next row does not become 37, but keeps counting from 38. how can i make the next row count from where it left, so that there wont be any gaps between id numbers? because this way whenever i make a mistake and have to delete a latest entry, the id number keeps counting. OR it really doesnt matter ?