In this post, you’ll learn about the error message -532 the relationship constraint name restricts the deletion of row with rid x’rid number’ in the IBM DB2 database , the reason why it occurs along with the solution to fix it
IBM DB2 Error Message
-532 the relationship constraint name restricts the deletion of row with rid x’rid number’
Reason for the Error
A DELETE operation attempted to delete a specified parent row in the object table and all related descendent rows in the descendent tables.� However, a delete rule of RESTRICT was specified for one or more descendent tables.A row of the table cannot be deleted because it has a dependent in a relationship with a delete rule of RESTRICT or the deletion cascades to a row which is a dependent in a relationship with a delete rule of RESTRICT.
Solution
Change the program to DELETE CHILD table row before DELETE of row on PARENT table.