Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Insert into employee (fname,lname,ssn,bdate,addres,gender,salary,supperssn,depnum) VALUES('Reem' ,'Khalid' ,9,'1984-08-13' ,'Dammam','F',12312,4,9) . why it gives: Error Code: 1452. Cannot add or update a child row: a foreign key

Insert into employee (fname,lname,ssn,bdate,addres,gender,salary,supperssn,depnum) VALUES('Reem' ,'Khalid' ,9,'1984-08-13' ,'Dammam','F',12312,4,9) .

why it gives:

Error Code: 1452. Cannot add or update a child row: a foreign key constraint fails (`company`.`employee`, CONSTRAINT `depnum` FOREIGN KEY (`depnum`) REFERENCES `departmen` (`dnumber`))

Step by Step Solution

3.47 Rating (167 Votes )

There are 3 Steps involved in it

Step: 1

The error message youre seeing is due to a foreign key constraint violation In this case the foreign ... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Income Tax Fundamentals 2013

Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill

31st Edition

1111972516, 978-1285586618, 1285586611, 978-1285613109, 978-1111972516

Students also viewed these Databases questions

Question

3 What is the difference between interval and ratio data?

Answered: 1 week ago