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

前端 未结 10 1624
感情败类
感情败类 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:30

    I think exactly what happens will be dependent on which database engine you're using (there may even be differences between INNODB and MyISAM in MySQL). Whatever happens, it's not going to be pretty.

    You'd simply have to change the column type to a larger integer.

提交回复
热议问题