ERROR 1452 (23000) : Cannot add or update a child row: a foreign key constraint fails ( student . course,CONSTRAI
在插入含有外键的表中,若要插入外键为空时,直接insert则会报错
遇到这种情况只要输入 SET FOREIGN KEY CHECKS = 0;即可
ERROR 1452 (23000) : Cannot add or update a child row: a foreign key constraint fails ( student . course,CONSTRAI
在插入含有外键的表中,若要插入外键为空时,直接insert则会报错
遇到这种情况只要输入 SET FOREIGN KEY CHECKS = 0;即可