navicat+MySQL設置外鍵MySQL 「Cannot add or update a child row: a foreign key constraint fails」

MySQL 「Cannot add or update a child row: a foreign key constraint fails」 MySQL「無法添加或更新子行:外鍵約束失敗」 意思就是本表的外鍵 在另一表中沒有數據 需要先遷移數據 舉例: 需要seller表中sellerId作爲外鍵 對應到assert表中的sellerId主鍵 如圖 先把數據都弄成一致 這樣就可以再取設置外鍵就
相關文章
相關標籤/搜索