PL/I · DB2 SQLCODE

SQLCODE -532: Delete Restricted by Relationship

What does SQLCODE -532: Delete Restricted by Relationship mean in PL/I?

A DELETE issued by the PL/I program tried to remove a parent row that still has dependent rows in a child table whose relationship is defined with a RESTRICT or NO ACTION delete rule.

SQLCODE -532: Delete Restricted by RelationshipDB2 for z/OS · PL/I (embedded SQL)

Condition

A DELETE issued by the PL/I program tried to remove a parent row that still has dependent rows in a child table whose relationship is defined with a RESTRICT or NO ACTION delete rule.

Fix

Delete or reassign the dependent child rows first, in the order the relationships require, or confirm the delete rule genuinely matches what the business logic needs before changing it.

Related db2 sqlcode