devios1
devios1

Reputation: 37985

Can the auto-increment value for a table be less than the maximum id?

And if so, what happens when it reaches an id that is already in use?

Upvotes: 0

Views: 477

Answers (1)

zerkms
zerkms

Reputation: 254906

  1. Nope, it cannot (though for innodb the value can be less than it was before server restart, but still more than the maximum value in the table)
  2. You get warning and cannot insert anything else in the table (I read it as s a question "what happens when autoincrement reaches the maximum possible value")

Upvotes: 3

Related Questions