Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Help on Insert Triggers
In that case, I would do it using the db constraints. Assuming you have
an unique index on TableSecondary.ColID:
create or replace trigger mytrigger
before drop on TableMain
for each row
begin
if <condition> then
--
begin
insert into TableSecondary values (:old.ColId, :old.ColName, :old.ColDesc); exception when DUP_VAL_ON_INDEX then null;
More on triggers:
http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_7004.htm#SQLRF01405 Received on Sun Nov 06 2005 - 11:49:25 CST
![]() |
![]() |