Use the Add Foreign Key window to add foreign keys to
your table. A foreign key is a column or set of columns in a table
whose values are required to match at least one primary key value of a row of
its parent table. A referential constraint is the rule that the values
of the foreign key are valid only if either:
- They appear as values of a parent key (primary key).
- Some component of the foreign key is null.
You can add multiple foreign keys before closing this window.
Fields and controls
Authorities and privileges

To add new foreign keys:
- In the Table schema box, specify the
schema of the parent table.
- In the Table name box, specify the name
of the parent table. The Primary key box displays a list of
the primary key columns defined for the parent table.
- In the Available columns box, select a column or columns that
you want to define as a foreign key. Each column you select must match
a primary key column for the parent table in meaning and data type.
- Click on the > push button to move the selected column or
columns to the Foreign key box.
- In the On delete box, specify what action
is to take place on the dependent table when a row is deleted from the parent
table.
- In the On update box, specify what action
is to take place on the dependent table when a row of the parent table is
updated.
- Optional: In the Constraint name
field, type a name for the constraint that you're defining.
- Click on the Apply push button to add the new foreign
key.
- Repeat steps 1 through 8 to add another foreign key to your table.
- Click on Cancel to close the Add Foreign Key window.
- If you do not want to make any additional changes to the table, click on
OK to alter your table and close the Alter Table notebook.
Otherwise, continue on to one or more of the optional tasks.

Related information