Error while adding Foreign key
问题 I am using Mysql Workbench. I have already made the table. Now I want to add foreign key in a table called Personal_Details that key is primary key in Login table. But when I am trying to do so, it shows me the following error: ERROR 1005: Can't create table 'shaadiDB.#sql-404_25' (errno: 121) SQL Statement: ALTER TABLE `shaadiDB`.`Personal_Details` ADD CONSTRAINT `Login_Id` FOREIGN KEY (`Login_Id` ) REFERENCES `shaadiDB`.`Login` (`Login_Id` ) ON DELETE NO ACTION ON UPDATE NO ACTION , ADD