before  on     --是什么句法
给你一个例子:
create trigger a_tri
before insert on a
for each row
begin
insert into b values(:new.col,...);
end;
/

解决方案 »

  1.   

    update t_user_info set t_user_info.usertel= (
       select t_useradditional_info.usertel 
         from t_useradditional_info
        where t_user_info.key = t_useradditional_info.key)
      

  2.   

    句法:
    http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96540/statements_76a.htm#SQLRF01405
      

  3.   


      before  on  这是有问题的
    before insert or update or delete on your table name
      

  4.   

    REATE OR REPLACE TRIGGER "NTDMWIP".TRI_CNT_EBMBM
      before update on NTDMWIP.EBMBM
      for each row
    declare
      v_min       NUMBER;
      v_second   NUMBER;
      v_second2   NUMBER;
    begin
      if (:new.RESERSTART is not null) and (:new.RESEREND is not null) then
        v_min := to_number(substr((:new.RESEREND-:new.RESERSTART)*24*60,1,11));
        v_second := MOD(TO_NUMBER(SUBSTR((:new.RESEREND-:new.RESERSTART)*24*60*60,1,11)),60);
        :NEW.LENDTIME:=TO_NUMBER(TO_CHAR(v_min) || '.' || TO_CHAR(v_second));
      end if;  if (:new.REALSTART is not null) and (:new.REALEND is not null) then
        v_min := to_number(substr((:new.REALEND-:new.REALSTART)*24*60,1,11));
        v_second2 := MOD(TO_NUMBER(SUBSTR((:new.REALEND-:new.REALSTART)*24*60*60,1,11)),60);
        :NEW.REALTIME:=TO_NUMBER(TO_CHAR(v_min) || '.' || TO_CHAR(v_second2));
      end if;  if (:new.REALSTART is not null) and (:new.RESEREND is not null) and (:new.REALSTART is not null) and (:new.REALEND is not null) then
        v_second := ABS(TO_NUMBER(SUBSTR((:new.REALEND-:new.REALSTART)*24*60*60,1,11)) - TO_NUMBER(SUBSTR((:new.RESEREND-:new.RESERSTART)*24*60*60,1,11)));
        v_min := TRUNC(v_second/60,0);
        v_second2 := MOD(v_second,60);
        :NEW.DELAYTIME:=TO_NUMBER(TO_CHAR(v_min) || '.' || TO_CHAR(v_second2));
      end if;
    exception
      when no_data_found then
      null;
    end TRI_CNT_EBMBM;