Advanced Database – Apply automatic update or deletion of related fields.
Open the Relation Design window again, this time change both Update options to ‘Update cascade’ for both lines.
Update cascade - automatically updates any related foreign keys to match the primary key.
Also set the Delete options to ‘Delete cascade’.
In the ‘Orders’ table, try changing the record with Order Ref 201, to ‘450’.
This time it updates the cascade, meaning any related field in the foreign table will be instantly updated.
Open the ‘Order Details’ table to check. Notice that all the instances of 201 have been changed to 450.
The other two options are Set null and Set default.
Set null – if primary key is changed, this will empty any corresponding foreign key records.
Set default – if primary key is changed, this will set the foreign key record to the default specified in the field properties.