原文:解決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