Reputation: 11
i have a table called ptb_users like this:
id (auto increment) | name | email
1 john [email protected]
2 kate [email protected]
29 harry [email protected]
10016 lisa [email protected]
id is an auto increment value and its so far gone upto id's 1-29, but now for some reason its skipped 30-10015 and its starting auto increment from 10016?
does anyone know why this is?
thanks
Upvotes: 1
Views: 122
Reputation: 1243
Usually this is because of an aborted transaction that allocated ids for insertion but then aborted. In general auto increment is only guaranteed to produce unique ids and should not be relied upon for producing a predictable sequence of numbers.
Upvotes: 1