Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Deleting from a related tables.

Re: Deleting from a related tables.

From: Daniel A. Morgan <Daniel.Morgan_at_attws.com>
Date: Tue, 10 Jul 2001 09:44:11 -0700
Message-ID: <3B4B30DB.FCA3CA47@attws.com>

Jeff Boyer wrote:

> Hey all,
>
> This is a very simple question I'm sure............. anyway, can anyone tell
> me the best way to delete a record that has data in related tables.
> Basically I need to know if there is a way to cascade a delete when deleting
> from the top table. I am using Oracle 8i as a backend for my online
> application. I need to allow the Admin to delete records.......
>
> Thanks ,
> Jeff

You can do it one of two ways: A delete trigger or by passing the parameters to a stored procedure and having it perform the checks and multiple deletes.

When doing this ... remember the heirarchy created by any foreign keys. You will only be able to delete in a single order unless using deferrable constraints.

Daniel A. Morgan Received on Tue Jul 10 2001 - 11:44:11 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US