- Cannot delete or update a parent row: a foreign key constraint fails
- MySQL库中有俩表,相互关联,在删除表的时候出错:
- 先根据ID删除俩表关联ID在同一张表同一列或多数据,再删除各自表。
- Integer deleteUserAndRoleById = userMapper.deleteUserAndRoleById(id);
Integer deleteUserById = userMapper.deleteUserById(id);
Cannot delete or update a parent row: a foreign key constraint fails 解决方法
最新推荐文章于 2022-04-16 16:06:02 发布