S
S
sHARek2018-04-26 11:39:52
MySQL
sHARek, 2018-04-26 11:39:52

How to fill in the table correctly?

There is a table
joxi.ru/8An6qjRsjDvMqA
id auto_increment
When manipulating on the site, I delete the line with id=9
Is there such a possibility in MYSQL that the next time data is added to this database, the data would be in line =9 ? Next at 11, 12, 13, etc.
Well, that is, there was a correct filling in the database, so that there would be an order of 1,2,3,4, etc.
And then it turns out 1,2,5,6,7,10,11, etc.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rsa97, 2018-04-26
@sHARek

AUTO_INCREMENT only guarantees that the id of the next inserted row will be greater than the id of any other row in the table. Lacunae when deleting lines and unsuccessful inserts is a completely normal situation, there is no point in fighting it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question