title: Error Code: 1822. Failed to add the foreign key constraint. Missing index for constraint 'hod_ibfk_1' in the referenced table 'student1' 0.000 sec?
body: <pre><code>create table Hod(
   BranchId int(5),
   Branch varchar(10),
   Hod_Name varchar(10),
   Hod_number int(15),
   foreign key (BranchId) references student1(BranchId)
  );
  </code></pre>