ALTER TABLE table1 ADD COLUMN column1 VARCHAR(400) DEFAULT NULL;

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

select * from table1 where <primary_key_field>='82133627';

Primary key - primary_key_field int(11) NOT NULL

solution - need to lock table, and then after running the query unlock it

LOCK TABLES "table1" WRITE;

run the alter table command:

ALTER TABLE table1 ADD COLUMN column1 VARCHAR(400) DEFAULT NULL;

then

UNLOCK TABLES;

相关文章:

  • 2021-04-29
  • 2021-07-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-25
  • 2021-10-16
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-17
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案