create or replace tripper checksalary
before update
on emp
for each row
begin
if:new.sal<:old.sal then
raise_application_error(-20002,'涨后的薪水不能小于之前的薪水');
end if
end
其代表同一条记录
:new 代表操作之后的值
:old 代表操作之前的值