Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Delete on Multiple Tables
if there is a hierarchy, say grandparent, parent, child ...
one could put an ON DELETE CASCADE constraint at the parent level to
delete the rows in the tables lower in the hierarchy.
another method would be via a trigger on one of the tables ...
create trigger tbd_tablea
before delete on tablea
for each row
begin
delete clause for table b;
delete clause for table c;
commit;
exception handler;
end;
kinda short, but I gotta run.
I'll bet that Dan Morgan has some examples up on his site.
-bdbafh Received on Thu Nov 10 2005 - 21:51:33 CST
![]() |
![]() |