某张表添加外键,报错 错误代码: 1452 Cannot add or update a child row: a foreign key constraint fails (
错误代码: 1452 Cannot add or update a child row: a foreign key constraint fails (
设置的外键和对应的另一个表的主键值不匹配
找出不匹配的值修改 或者 清空两表数据