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: <johnparcels_at_gmail.com>
Date: 6 Nov 2005 09:34:42 -0800
Message-ID: <1131298482.853381.73550@f14g2000cwb.googlegroups.com>


 Thank you very much for your quick reply. It is well appreciated. I want to ensure that the record I would be inserting into TableSecondary does not exist. Can I write somthing like this: Basically I want to check the non-existence of the ColId I would be inserting.

create or replace trigger mytrigger
before drop on TableMain
for each row
begin
  if ColId <> :old.ColId then
    insert into TableSecondary values (:old.ColId, :old.ColName, :old.ColDesc);
  end if;
end; Received on Sun Nov 06 2005 - 11:34:42 CST

Original text of this message

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