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

Home -> Community -> Usenet -> c.d.o.server -> Re: Help on Insert Triggers

Re: Help on Insert Triggers

From: mRangel <marcus.rangel_at_gmail.com>
Date: 6 Nov 2005 09:20:40 -0800
Message-ID: <1131297640.798177.296920@o13g2000cwo.googlegroups.com>


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

Original text of this message

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