更新时间:2022-11-08 18:36:44
看起来 MySQL 接受它(不抱怨语法),但实际上并没有创建外键.
It looks like MySQL accepts it (doesn't complain about the syntax) but the foreign key is not actually created.
要创建这个外键,运行这个命令:
To create this foreign key, run this command:
ALTER TABLE employee ADD CONSTRAINT fk_department FOREIGN KEY (departmentID) REFERENCES department (departmentID);