try:
触发器改成after update ...

解决方案 »

  1.   

    mutation table?you can use a package and two trigger to resolve this problem .
    one(row level trigger) is touched off before update event,
    so you can put the aim value into package variable,
    another is touched off after update event
      

  2.   

    用包中的变量或者临时表都可以,用临时表效率应该更好一点  
    参考:create  global  temporary  table  tmpTable  
     (AddressID  varchar2(10))  
     on  commit  delete  rows  
    /  
     
    CREATE  OR  REPLACE  TRIGGER  TRG_APPTREEPRE_DELETE_For_Each_Row  
    Before  DELETE  ON  APPTREEPRE  
    For  Each  Row  
    BEGIN  
       insert  into  tmpTable  (AddressID)  
       values  (:old.AddressID);  
    END;  
    /  
     
    CREATE  OR  REPLACE  TRIGGER  TRG_APPTREEPRE_DELETE  
    After  DELETE  ON  APPTREEPRE  
    BEGIN  
       Update  Predata  X  
             SET  IsClassified  =  0  
         Where  AddressID  in  (Select  AddressID  from  tmpTable)  
             and  not  exists  (select  'x'    
                                                 from  apptreepre  
                                               where  AddressID  =  x.ADDRESSID);  
    END;  
    /
      

  3.   

    to ache0327(阿澈) 
    我对包不太熟悉,可否有例子提供参考~~~多谢
    to bzszp(SongZip) 
    谢谢,我去试一下~~~