docs.intersystems.com
Home  /  Application Development: Core Topics  /  Class Definition Reference  /  Foreign Key Keywords  /  OnDelete


Class Definition Reference
OnDelete
[Back]  [Next] 
InterSystems: The power behind what matters   
Search:  


Specifies the action that this foreign key should cause in the current table when a record is deleted in the foreign table.
Usage
To specify what happens in the current table when a record is deleted in the foreign table, use the following syntax:
ForeignKey keyname(key_props) References pkg.class(ref_index) [ OnDelete = ondelete ];
Where ondelete is one of the following:
Description
This keyword defines the referential action that occurs when a record is deleted from the foreign table.
Default
The default is noaction.
See Also