Error Code: 1822. Failed to add the foreign key constraint. Missing index for constraint ’employee_ibfk_1′ in the referenced table ‘branch’

strong text I AM GETTING THE ABOVE ERROR AFTER EXECUTING ALTER TABLE STATEMENT… I HAVE ASSIGNED THE SAME DATA TYPES for both ids’s. HOW TO RESOLVE THE ABOVE ERROR.

CREATE TABLE Employee( Emp_ID INT PRIMARY KEY, First_Name VARCHAR(25), Last_Name VARCHAR(25), Birth_Day DATE, Sex VARCHAR(1), Salary INT, Super_ID INT, Branch_ID INT );

CREATE TABLE Branch( Branch_ID INT, Branch_Name VARCHAR(40), Mgr_ID INT, Mgr_Start_Date DATE, FOREIGN KEY(Mgr_ID) REFERENCES Employee(Emp_ID) );

ALTER TABLE Employee ADD FOREIGN KEY(Branch_ID) REFERENCES Branch(Branch_ID) ON DELETE SET NULL;