天天看點

給資料表增加字段的時候報錯error 1062(23000)

給原表添加列(alter table add column)的時候報錯:

error 1062(23000): duplicate entry '1218652' for key 'PRIMARY'

原因參考這兩篇:

http://blog.itpub.net/28218939/viewspace-2654121/

https://www.bbsmax.com/A/GBJrlKoqd0/

https://cloud.tencent.com/developer/article/1006513

額外知識補充可以參考如下:

https://www.cnblogs.com/cchust/p/4639397.html

https://blog.csdn.net/finalkof1983/article/details/88355314

https://www.cnblogs.com/cchust/category/802863.html

https://dev.mysql.com/doc/refman/5.7/en/innodb-online-ddl-operations.html#online-ddl-column-syntax-notes