Teng Tao wrote:You have (at least) a row in fact_customer_feedback.CFcustomer_Id which> i have created 2 tables and want to make a FK between them,
> ALTER TABLE `icts`.`fact_customer_feedback` ADD CONSTRAINT
> `FK_fact_customer_feedback_2` FOREIGN KEY `FK_fact_customer_feedback_2`
> REFERENCES `fact_customer` (`id`)
> ON DELETE RESTRICT
> ON UPDATE RESTRICT;
> but it ruturns the error number 1452
> cannot add or update a child row : a foreign key constraint fails.
does not exist in fact_customer.id.
When you create any constraint (not just a foreign key), all rows in the
table must satisfy the constraint or the creation will fail.
Remove the "x" from my email address
JDS Computer Training Corp.