Hi I've been trying to code this
ALTER TABLE `inventory_slit` ADD CONSTRAINT `qualitycontrol_username_slit` FOREIGN KEY (`qualitycontrol_username`) REFERENCES `qualitycontrol_info`(`qualitycontrol_username`) ON DELETE RESTRICT ON UPDATE RESTRICT;
But the result is :
#1452 - Cannot add or update a child row: a foreign key constraint fails (`dcpc`.`#sql-434_597`, CONSTRAINT `qualitycontrol_username_slit` FOREIGN KEY (`qualitycontrol_username`) REFERENCES `qualitycontrol_info` (`qualitycontrol_username`))
That was said by the MYSQL. Can you help me how to fix this?