create or replace trigger_name
after update of colname on dept_master
for each row
begin 
update user_master set user_dept = :new.dept_id where user_dept = :old.dept_id ;
end ;

解决方案 »

  1.   

    为什么要加of colname ?
    去掉它试试
      

  2.   

    update of colname :只有update colname 才触发.
      

  3.   

    Trigger is nothing to do with Powerbuilder this kind of fronter language . It's an oracle object . It only trigger when the condition is met . So please check your pb code or datawindow syntax, I guess the colname is not updated .
      

  4.   

    当然加入Of column后,只有在操作这个列时才会触发,如果你正是要这样,这个问题就在于你更新数据库时的操作方式了,也许你不是用Update去修改数据,而是删除、增加呢?如果这样其不是永远也触发不了你的触发器了?
     如果用数据窗口修改,将update属性改一下。
     你可以先做一个insert,delete触发器测试一下,看看是不是没有update。
      

  5.   

    pb中数据窗口编辑状态下看看菜单row---〉update properties中key modification是不是“use delete then insert"先删除后插入当然就不触发你的after update of colname on dept_master条件了选中use update即可
      

  6.   

    qiuyang_wang(小数点)你的观点应该没有问题!我认为也是的!