Question: INSERT INTO Billing ( BillingID , RecordID, PatientID, TotalAmount, PaymentStatus ) VALUES ( 1 , 1 , 1 , 2 0 0 . 0 0

INSERT INTO Billing (BillingID, RecordID, PatientID, TotalAmount, PaymentStatus)
VALUES
(1,1,1,200.00, 'Paid'),
(2,2,2,150.00, 'Paid'),
(3,3,3,100.00, 'Paid'),
(4,4,4,250.00, 'Paid'),
(5,5,5,300.00, 'Paid'),
(6,6,1,175.00, 'Paid'),
(7,7,3,125.00, 'Paid'),
(8,8,5,225.00, 'Paid'); *** I keep getting this error code in sql how do i fix it ?02510:58:19 INSERT INTO Billing VALUES
(1,1,1,200.00, 'Paid'),
(2,2,2,150.00, 'Paid'),
(3,3,3,100.00, 'Paid'),
(4,4,4,250.00, 'Paid'),
(5,5,5,300.00, 'Paid'),
(6,6,1,175.00, 'Paid'),
(7,7,3,125.00, 'Paid'),
(8,8,5,225.00, 'Paid') Error Code: 1452. Cannot add or update a child row: a foreign key constraint fails (`healthcare`.`billing`, CONSTRAINT `billing_ibfk_1` FOREIGN KEY (`Record_ID`) REFERENCES `medicalrecord`(`Record_ID`))0.000 sec

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 Databases Questions!