What happens when DB engine runs out of numbers to use for primary keys?

前端 未结 10 1692
感情败类
感情败类 2021-01-18 10:59

Since DBs do not reuse numbers of deleted records it is possible to run out of numbers, especially if you pick not really a big integer type for this column.
What would

10条回答
  •  时光取名叫无心
    2021-01-18 11:26

    For MySQL, it is documented that:

    The behavior of the auto-increment mechanism is not defined if a user assigns a negative value to the column or if the value becomes bigger than the maximum integer that can be stored in the specified integer type.

提交回复
热议问题