Answer the question
In order to leave comments, you need to log in
How to order the ID field by AUTO_INCREMENT?
I don't know what went wrong, but now the value of the ID field is very huge (11111462)
Отображение строк 0 - 24 (18027 всего, Запрос занял 0.0014 сек.) [ID: 11111461 - 11111437
Answer the question
In order to leave comments, you need to log in
Don't worry, the maximum value of int = 2147483647, you are still very far from this number.
Accounts are added, deleted, added, deleted, but after deletion, the counter should not be reset, it continues to tick. That's the way it should be. That's when it exceeds two billion, then it will be necessary to worry and urgently change the type of the column from int to bigint, and forget it.
But of course there is another option that will suit you, but here you will need to abandon AUTO_INCREMENT, and write your own trigger, or whatever, so that when adding a new record, a free ID is set in the ID field.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question