How to fill out the table?

Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
There is a table

id auto_increment

When operating on the site, and remove the row with id=9

There is a possibility in MYSQL what would the next data is added to this database, the data was in the row =9 ? Next at 11, 12, 13, etc.
Well, that is the correct seeding, that would have been the order of 1,2,3,4, etc.
And it turns out 1,2,5,6,7,10,11 etc.
by | 16 views

1 Answer

0 like 0 dislike
AUTO_INCREMENT guarantees only that the id of the next inserted row will have more than id of any other row in the table. Gaps when you delete a row and failed inserts is quite a normal situation, to deal with it makes no sense.

Related questions

0 like 0 dislike
2 answers
asked Apr 13, 2019 by Teshuhack
0 like 0 dislike
2 answers
0 like 0 dislike
1 answer
110,608 questions
257,186 answers
35,573 users