问题描述:
报错如下:
ERROR 1451 (23000): Cannot delete or update a parent row: a foreign key constraint
提示有外键约束,不能删除父表记录,然而父表记录对应的子表中并没有相关记录

解决方式:
SET FOREIGN_KEY_CHECKS=0;
delete from account where id=22687 and name like '%xxxx%';
SET FOREIGN_KEY_CHECKS=1;

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-10-17
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-08-13
  • 2021-05-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案