create or replace trigger salarychange
before insert or update on employee
for each row
when (new.eno>0)
declare
sal_diff number;
begin
sal_diff:=:new.sal - :old.sal;
dbms_output.put_line('Old Salary = '|| :old.sal);
dbms_output.put_line('New Salary = '|| :new.sal);
dbms_output.put_line('Salary Difference = '|| sal_diff);
end;
/
select * from employee;
insert into employee(eno,ename,dept,sal) values (6,ígirií,ícsí,5000);
update employee set sal=sal+500 where eno=102;