create trigger of dur_upd_ord 
befor update of amount on orders
  referencing old as pre new as post
for each row
 when (post.amout!=pr.amount)
  begin
   if (post.amount>pre.amount) then
     insert into....
  elseif (post.amount<pre.amount) then
     insert into...
  end if;
  end;

解决方案 »

  1.   

    create trigger  dur_upd_ord 
    befor update of amount on orders
      referencing old as pre new as post
    for each row
     when (post.amout!=pr.amount)
      begin
       if (post.amount>pre.amount) then
         insert into....
      elseif (post.amount<pre.amount) then
         insert into...
      end if;
      end;
      

  2.   

    ...
    IF UPDATING THEN
            
       IF :NEW.Using_count<> :OLD.Using_count THEN
       ....
       end if;
    end if;
    ...
      

  3.   

    create or replace trigger tr_add_using_count
        after update on  Dm_document
        for each row
    begin
        if updating then 
            if :new.Using_count<> :old.Using_count then 
                insert into log_table values('Using_count列被更新!');
            end if;
        end if;
    end;
      

  4.   

    可不可以这么写:
    create or replace trigger tr_add_using_count
    after update on Dm_document
    for each row(:new.Using_count<> :old.Using_count)
    begin
      ……
      ……
    end