At 10:14 PM +0200 5/21/1999, Davor Cengija wrote:
> i'm still very new to mysql, so if such a question is already
> answered somewhere, URL would be just fine.
> i have a table with auto_increment field (and lets say 20
> rows). if i delete row 10, and then insert a new row, it gets
> id=21 which is ok. but if i delete the row the the highest id
> value (here 21) and then insert a new on, it gets id=21.
> should'n it be 22?
No. The new id is always one more than the largest id currently in
the table. If you delete all the rows, the sequence will start over
This behavior will change when 3.23.x comes out, when you'll be able
to get strictly increasing sequences with no reuse.
Paul DuBois, paul@stripped
Northern League Chronicles: http://www.snake.net/nl/