0
,這是我的知己聲明試圖連接兩個表:Mysql的改變聲明
ALTER TABLE my_contacts
CHANGE `profession` `profession_id` INT NOT NULL,
ADD CONSTRAINT professions_profession_id_fk
FOREIGN KEY (profession_id) REFERENCES professions (profession_id)
,我有以下錯誤:
#1452 - Cannot add or update a child row: a foreign key constraint fails (`contacts`.<result 2 when explaining filename '#sql-1ca_73'>, CONSTRAINT `professions_profession_id_fk` FOREIGN KEY (`profession_id`) REFERENCES `professions` (`profession_id`))
任何人都可以指導我這是什麼?我實際上在學習如何自己編寫sql,因爲我一直使用這些工具。