when(new.sage<old.sage)
不知道有没有这种用法
你用if 试一下
if new.sage<old.sage then 
   raise_application_error(-20508,'Don't decrease salary');
end if;

解决方案 »

  1.   

    when(new.sage<old.sage)
    不知道有没有这种用法
    你用if 试一下
    if new.sage<old.sage then 
       raise_application_error(-20508,'Don't decrease salary');
    end if;
    ----------------------------------------------------------
    这个我不会用阿,在哪里写,我是新手。不会有非法字符吧,MainConcole不应该是关键字阿。
      

  2.   

    create or replace trigger check_sage
        before update on s    ---s 就是你的表名
        for each row
         begin
          if  new.sage<old.sage then 
           raise_application_error(-20508,'Don't decrease salary');
          end if;
       end;
        /这样应该没有问题了吧!你试一下!