DB2's foreign key has four settings on Delete:
No action: do not be affected by the literal meaning. It actually means the same as restrict Delete.
Restrict Delete: indicates that when deleting a parent table record, if the associated records of the child table exist, the table will be rolled back and an error is returned;
Cascade: indicates that the records of the sub-table are deleted (cascade deletion.) while the parent table is deleted .);
Set NULL: when the parent table is deleted, the foreign key column of the child table is set to NULL;
The difference between no action and restrict Delete is that:
Note:No actionIs the default situation for DB2 UDB on Unix or windows. Restrict Delete is the default situation for DB2 UDB on Z/OS.
No action means 'do not perform any operation '. When some people are confused, they do not think of a key role of foreign keys: Prevent data islands from being wrong.
Therefore, the true meaning of "no action" is "do not perform any operation, and the DB processes the operation according to the original logic '. The original logic of DB isRestrict Delete.
--- Correct your understanding of errors.