Setting Foreign Key Options

How To

You can choose a foreign key as well as select foreign key options. The following table shows the effect of available foreign key options.  

Foreign Key Option

Description

Set Null

Records in the foreign key column are set to Null if the user updates / deletes the corresponding records in the primary key or unique index column

Cascade

The corresponding records in the referencing table are also updated or deleted.

Set Default

The foreign key record is set to a default value if the user updates / deletes corresponding records in the primary key or unique index column.

No Action

There is no action on the foreign key column if the user updates / deletes corresponding records in the primary key or unique index column.

Table: Foreign Key Options 


Related topic:

Creating a Foreign Key
Adding a Foreign Key