0
我有以下查詢:錯誤添加外鍵約束
ALTER TABLE ROUTE ADD FOREIGN KEY (RID) REFERENCES RESERVATION(RID) ON DELETE CASCADE
,但它產生了我一個錯誤:
#1452 - Cannot add or update a child row: a foreign key constraint fails (`SmarTrek`.`#sql-91e_d09`, CONSTRAINT `FK_RID` FOREIGN KEY (`RID`) REFERENCES `RESERVATION` (`RID`) ON DELETE CASCADE)
在設計模式,這裏是什麼樣子:
謝謝,這解決了我的問題 – aherlambang 2011-04-01 05:23:15