Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Handling Cascade Delete

nagornyiOct 24 2007 — edited Oct 24 2007
I need to delete a record with the given value of ID field (PK) from table A. There are several dozens of tables where ID is used as FK. I was thinking about writing a procedure that deletes records from all children tables, and then deletes from the parent. However, some of those child tables have other tables referred to them, and so on. So it is a pretty evolved tree structure. What's the best way of handling this kind of delete? Is there alternative to uncovering entire tree structure and doing all deletes from bottom up?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 21 2007
Added on Oct 24 2007
6 comments
924 views