Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Help on Insert Triggers
It goes something like this:
create or replace trigger mytrigger
before drop on TableMain
for each row
begin
if <condition> then
insert into TableSecondary values (:old.ColId, :old.ColName,
:old.ColDesc);
end if;
end;
johnparcels_at_gmail.com wrote:
> Hi All
> I am new to this group and my friends gave a great feedback. I need
> help in writing Insert
> triggers that would insert a record on a table, whenever a specific
> record is deleted from another table. I am using Oracle 10g.
>
> For eg. TableMain has columns ColId, ColName and ColDesc.
> TableSecondary has same columns as TableMain.
> I want to insert the same record in TableSecondary, that would be
> deleted from TableMain
> based on a condition.
>
> Can someone Help and show me a link, that would help write triggers. I
> would be writing
> few more triggers in future.
>
> Thank's alot.
>
> JohnP.
Received on Sun Nov 06 2005 - 11:20:40 CST
![]() |
![]() |