To add a foreign key during table creation:

  1. Follow the steps in the Create Table wizard until the Create Foreign Key to identify Column(s) window will open.

  2. Click Add. The Create Foreign Key - Introduction window will open.

  3. Click Next. The Name the Foreign Key window will open.

  4. Enter the foreign key name in the Foreign Key Name text field.

  5. Click checkboxes beside the column names to indicate which columns to include in the foreign key.

  6. Click Next. The Choose the primary key(s) from another table window of the Create Foreign Key Wizard is displayed.

  7. Select the name of the referenced table from the Referenced Table menu.

    Note: Only tables containing primary keys or unique indexes that match the schema of the foreign key are shown

  8. All the selected table columns that are primary keys or unique indexes will be displayed.

  9. Click Next. The Update action and Delete action window will open.

  10. Choose a foreign key setting from the Update Action menu.

  11. Choose a foreign key setting from the Delete Action menu.

  12. Click Next. The Final Review window for foreign key creation will open.

  13. Click Finish. The Create Foreign Key to identify Column(s) window reappears.

  14. To delete a foreign key:

    1. Select the foreign key you want to remove.

    2. Click the Remove button.

  15. Click Next. The Advanced Information window will open.


Related topic:

Adding a Foreign Key While Creating a Table
Setting Advanced Table Options

To set advanced table options

To add a unique constraint