ERROR 1062 (23000): Duplicate entry '2147483647' for key 'PRIMARY'

前端 未结 2 1945
青春惊慌失措
青春惊慌失措 2020-12-20 05:18

First off all, i\'ve seen many others post like this, however the answer wasn\'t working on my particular case. Just in case i am only few months studding SQL, i have no mu

2条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-20 05:46

    Something to ask yourself. How did the number get that big? I did not insert 2 billion rows!

    Well, possibly you 'burned' that many AUTO_INCREMENT ids. This can happen in man ways:

    INSERT IGNORE ... -- when the insert is ignored (because it the row already exists)
    REPLACE
    IODKU
    

    and probably others.

提交回复
热议问题