原文:解决Cannot delete or update a parent row: a foreign key constraint fails的mysql报错

问题 删除有外键关联的数据或者表的时候,mysql出现报错: Cannot delete or update a parent row: a foreign key constraint fails 解决方法 SET foreign key checks 先设置外键约束检查关闭 drop table mytable 删除数据,表或者视图 SET foreign key checks 开启外键约束 ...

2019-06-05 16:37 1 1173 推荐指数:

查看详情

 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM