Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Help with Trigger!!!
Dear Friends,
Thank you very much - this working very good.
Can you help with a little bit more complicated one?
I have Table1(ColA, ColB, ColC,....)
trigger before delete making a copy of Record into the
Table1Copy(ColA, ColB, ColC,...)
All OK.
Next I have Table2(ColA, ColD,...) that linked with the Table1 via the
ColA;
I want to create the trigger that will copy Record before delete into
the Table2Copy(ColA, ColB,ColD,...) that have the same fields as a
Table2 but one field more(ColB) that must be taken from Table1.
I try to do this:
create trigger x before delte on Table2 for each row
declare
ColB Number(6,0);
begin
select ColB into ColB from Table1 where Table2.ColA = Table1.ColA
![]() |
![]() |