Is there a way to force delete all dependent rows (child rows) when you delete the parent row of a table.
I have a table with too many referential integrity. I was wondering what is the easy way to achieve this in oracle.
I appreciate your support.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can declare foreign key constraints that cascade deletes so that child rows are automatically deleted when the parent row is deleted.
I’m personally not a fan of this sort of cascading delete– I’d rather see the delete against the child table as part of the procedure that deletes from the parent so that the flow of the program is all in one place. Cascading foreign keys are like triggers in that they can seriously complicate the program flow by adding actions that are hard for a developer reading through code to notice and to track.