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 10:22:09 -0800
Message-ID: <1131301329.378938.236280@g44g2000cwa.googlegroups.com>


Well, if there is nothing else to check, you may remove the entire "if" clause. As a consequence, the extra begin/end block would be also removed. For some reason it seems odd to me, but it will work.

create or replace trigger mytrigger
before drop on TableMain
for each row
begin
  insert into TableSecondary
  values (:old.ColId, :old.ColName, :old.ColDesc); exception
  when DUP_VAL_ON_INDEX then
    null;
end; Received on Sun Nov 06 2005 - 12:22:09 CST

Original text of this message

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