Skip to Main Content

trigger update

SafiullahDec 25 2011 — edited Dec 25 2011
Hi,

create or replace trigger a1a2
BEFORE INSERT
ON a1
REFERENCING NEW AS NEW OLD AS OLD
FOR EACH ROW
DECLARE
begin
if inserting then
insert into a2
values(:old.ID, :old.NAMF);

insert into a2
values(:new.ID, :new.NAMF);

elsif updating then
update a2
set namf = 'f'
where id = 1;
end if;
End ;
/



insert into a1
values(100, 'awds')

update a1
set namf = 'fsdfsf'
where id = 100

insert works but update does not work that means update does not update the value.
Pls advise.

Thanks.
Comments
Post Details
Added on Dec 25 2011
2 comments
23 views