# [EMAIL PROTECTED] / 2003-09-25 14:59:33 +0100: > CREATE TABLE `pheno` ( > `id` smallint(5) unsigned NOT NULL auto_increment, > `relevant` enum('y','n') default NULL, > `phenotype` varchar(50) NOT NULL default '', > PRIMARY KEY (`id`,`phenotype`), > KEY `id` (`id`), > CONSTRAINT `0_125` FOREIGN KEY (`id`) REFERENCES > `monogenic` (`phenotype_ID`) ON DELETE CASCADE, > CONSTRAINT `0_127` FOREIGN KEY (`id`) REFERENCES > `knockout` (`phenotype_ID`) ON DELETE CASCADE > ) TYPE=InnoDB > > > The problem is that I can't insert a record into this > table unless the value of 'id' is present in both the > mongenic and knockout tables. I receive the following error: > > Cannot add or update a child row: a foreign key > constraint fails
what did you expect to happen instead, or, what did you expect the two FK's to do instead? -- If you cc me or remove the list(s) completely I'll most likely ignore your message. see http://www.eyrie.org./~eagle/faqs/questions.html -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]