开发者

Foreign Key Constraint fail

I'm trying to insert a new row in the table bu开发者_开发问答t I'm getting below error:

Cannot add or update a child row: a foreign key constraint fails (`wmetools_restool_dev/keywords`, CONSTRAINT `keywords_ibfk_1` FOREIGN KEY (`link_id`) REFERENCES `links` (`link_id`) ON DELETE CASCADE ON UPDATE CASCADE)

I have supplied all the fields required. Does it mean I need to insert more fields?


The table has a foreign key contraint to another table called links. You have to first insert a row in the links table with the correct link_id before you can insert the row into your table.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜