Creating foreign key in MySQL
问题 I trying to create foreign key in MySQL using MySQL workbench. But there is an error $ Executing: ALTER TABLE `project_course`.`attendance` ADD CONSTRAINT `FK_Student` FOREIGN KEY ('idStudent') REFERENCES `project_course`.`student` ('userid') ON DELETE NO ACTION ON UPDATE NO ACTION; Operation failed: There was an error while applying the SQL script to the database. ERROR 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right