Duplicate entry '2147483647' for key 1

前端 未结 12 768
南笙
南笙 2020-12-18 21:41

Strange problem I can\'t seem to get my head around. I have a table in a MySQL database with the following structure...

    CREATE TABLE IF NOT EXISTS `tblb         


        
12条回答
  •  無奈伤痛
    2020-12-18 22:24

    you've hit the 32-bit integer limit, thus preventing the auto increment from incrementing. switching your pk to bigint with a higher column length should fix the issue.

    Also, if your PK is never going to be negative, switching to an unsigned int should give you more space.

提交回复
热议问题