I have a MySQL (5.1.42 on OsX) running. I added a Foreign Key with this sql statement:
ALTER TABLE `Portal`.`Mitarbeiter_2_BlackBerry`
ADD CONSTRAINT `fk_Blackberry`
FOREIGN KEY (`id` )
REFERENCES `Portal`.`Blackberry` (`id` )
ON DELETE NO ACTION
ON UPDATE NO ACTION
, ADD INDEX `fk_Blackberry` (`id` ASC)
But when i try to insert values in that table with this sql statement:
INSERT INTO Mitarbeiter_2_BlackBerry SET uebergabeAm = '2009-12-01 13:00:00', fk_Blackberry = (SELECT id FROM Blackberry WHERE id = '1')
I got the following Error: Error Code: 1054 Unknown column 'fk_BlackBerry' in 'field list'
Anybody an idea what could be wrong? Thanks for any hint :-) Lars.