RPG (IBM i / AS/400) · DB2 SQLCODE
What does SQLCODE -531 - Parent Key Update/Delete Restricted mean in RPG (IBM i / AS/400)?
An UPDATE or DELETE against a parent table's key column was blocked because one or more child rows still reference that key and the foreign key constraint's rule is RESTRICT or NO ACTION.
An UPDATE or DELETE against a parent table's key column was blocked because one or more child rows still reference that key and the foreign key constraint's rule is RESTRICT or NO ACTION.
Remove or update the dependent child rows first, or revisit the constraint's delete/update rule if cascading is actually the intended behavior, then re-run the operation.