Question: An error message: ERROR 1 4 5 2 ( 2 3 0 0 0 ) : Cannot add or update a child row: a foreign

An error message:
ERROR 1452(23000): Cannot add or update a child row: a foreign key constraint fails (`csit115`.`COURSE`, CONSTRAINT `course_fkey1` FOREIGN KEY (`offered_by`) REFERENCES `DEPARTMENT`(`name`) ON DELETE CASCADE)
means, that
Question 11Answer
a.
INSERT statement cannot insert a new row that has a value of foreign key different from all values of the respective primary key
b.
INSERT statement cannot insert a new row that has a value of primary key the same as one of the values of the respective foreign key
c.
INSERT statement cannot insert a new row that has a value of primary key different from all values of the respective foreign key
d.
INSERT statement cannot insert a new row that has a value of foreign key the same as one of the values of the respective primary key

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!