创建行触发器用for each row 以下为创建一个行触发器
create or replace trigger tr_emp_sal
before update of sal on emp
for each row
begin
if :new.sal < :old.sal then
raise_application_error(-20001,'工资只涨不减');
--raise_application_error 的使用见raise_application_error的学习
end if;
end tr_emp_sal
执行update语句
update emp set sal = 1500;