Cannot add or update a child row: a foreign key constraint fails 解决办法

缘由: 设置的外键和对应的另外一个表的主键值不匹配。 解决方法: 找出不匹配的值修改。 或者清空两表数据。
相关文章
相关标签/搜索