In this recipe, we are going to create the Employee table with the foreign key attribute, namely,
Open the MySQL Query Browser and create the employee table, as we did in the preceding recipe.
- Select the Foreign Keys tab.
- Press the + (plus) symbol at the bottom.
- Enter FK_Employee_Branch_BranchId as the Foreign Key Name.
- Click on OK.
- Select Branch from the Ref. Table.
- Select Restrict from the On Delete combo box.
- Select Cascade from the On Update combo box.
- Click on Apply Changes | Execute.
- Click on ...