Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Deleting from a related tables.
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