PL SQL trigger using raise_application_error thows error.

前端 未结 2 1079
难免孤独
难免孤独 2021-01-24 05:50

I have a few things of code I need help debugging but I feel that if I can get one of them running i\'ll be able to get the rest(oh how i hope).

create or replac         


        
2条回答
  •  心在旅途
    2021-01-24 06:30

    create or replace trigger deny_dec_pu before update of PU on ARTICLE
     for each row
     declare     
     erreur_pu exception;
      begin
    
         *insert into erreur values ('Operation de MAJ',sysdate);*
    
          -- this intruction is never executec why ?          
    
      if (:new.pu < :old.pu) then
      raise erreur_pu ; 
     end if;
     exception 
     when erreur_pu then 
      Raise_application_error(-20100, 'rrrrrrrr', FALSE); 
    
     end;
    

    /

提交回复
热议问题