Friday, November 27, 2009

Oracle trigger if inserting or updating

create trigger ins_or_upd before insert or update of salary on newemp
for each row
begin
if inserting then
insert into emp_audit values (:new.salary);
else
insert into emp_audit values(:old.salary);
end if;
end;
/

No comments:

Blog Archive