Hi
I am trying to see the output of a simple
update trigger program, but it seems its not getting fired or probably i dont know how to see its result .
If the trigger results in inserting data into another table ..i am getting such a result but not on the screen .
I have tried enabling the trigger and read forum too but i am not getting it at all
please help ..
create or replace trigger print_salary_changes
BEFORE delete or insert or update OF SALARY on employees
for each row
when(new.job_id<> 'AD_PRES')
declare
sal_diff number;
BEGIN
sal_diff:=:new.salary - :old.salary;
dbms_output.put(:new.last_name||',');
dbms_output.put('olD SALARY='||:old.salary||',');
dbms_output.put('nEW SALARY='||:new.salary||',');
dbms_output.put('Difference'||sal_diff);
end;
/
TRIGGER print_salary_changes compiled
If i try to update i do get the updated rows but not the trigger result .
update employees
set salary= salary*1.07
where department_id in(10,20,90);
6 rows updated.
Thanks
Edited by: to_learn on Dec 28, 2011 3:33 PM