hi
i created a trigger like this
[code=oracle]
create or replace trigger new before update on empl for each row
declare
pragma autonomous_tran saction;
begin
delete from empl1 where name = :old.name ;
insert into empl1 select * from empl where name=:old.name ;
commit;
end;
[/code]
If i do some updation in empl table that is not getting reflected due to this insert command. If i comment out the insert statement, trigger is working fine.
I need to specify some condition in the Insert statement thats why i cannot use INSERT into empl1 values(:new.nam e...) command
Wat could be the reason for this..can someone tell me the reason...
thanks in advance..
i created a trigger like this
[code=oracle]
create or replace trigger new before update on empl for each row
declare
pragma autonomous_tran saction;
begin
delete from empl1 where name = :old.name ;
insert into empl1 select * from empl where name=:old.name ;
commit;
end;
[/code]
If i do some updation in empl table that is not getting reflected due to this insert command. If i comment out the insert statement, trigger is working fine.
I need to specify some condition in the Insert statement thats why i cannot use INSERT into empl1 values(:new.nam e...) command
Wat could be the reason for this..can someone tell me the reason...
thanks in advance..
Comment