Use the Foreign Keys page of the Create Table notebook 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, change, or remove new foreign keys for your table.
After the table is created, you must use the Alter function to add, change, or
remove foreign keys.
Fields and controls
Authorities and privileges

To add new foreign keys:
- Click on the Foreign Keys tab.
- Click on Add. The Add Foreign Key window opens.
- 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 that 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 Apply to add the new foreign key.
- Repeat steps 3 through 10 to add another foreign key to your table.
- Click on Cancel to close the Add Foreign Key window.
- If you do not want to add check constraints, click on OK to
create your table and close the Create Table notebook. Otherwise,
continue on to add check constraints.

Related information