类似这样的语句缺from select count(*) into p_count table_trigger  WHERE jh = :old.jh;

解决方案 »

  1.   

    用show error可以看到错误.
    然后慢慢改.
    不懂再问.
      

  2.   

    select * from * where *=*;
      

  3.   

    这是 show error LINE/COL ERROR
    -------- -----------------------------------------------------------------
    26/48    PLS-00103: Encountered the symbol "VALUSE" when expecting one of
             the following:
             ( select values
             The symbol "select" was substituted for "VALUSE" to continue.26/82    PLS-00103: Encountered the symbol ";" when expecting one of the
             following:
             . ( , * % & - + / mod rem <an identifier>
             <a double-quoted delimited-identifier> an exponent (**) as
             from ||40/48    PLS-00103: Encountered the symbol "VALUSE" when expecting one of
             the following:
             ( select values
             The symbol "select" was substituted for "VALUSE" to continue.40/82    PLS-00103: Encountered the symbol ";" when expecting one of the
             following:
             . ( , * % & - + / mod rem <an identifier>
             <a double-quoted delimited-identifier> an exponent (**) as
             from ||
      

  4.   

    即使 我这样处理也不行create or replace trigger tri_bbeb
      after insert or delete or update on bbeb  
      for each row
      DECLARE
      p_count integer;
      p_data  date;
    begin
     end tri_bbeb;
      

  5.   

    insert into table_trigger(sjbmc,jh,xgsj,bz) valuse ('bbeb',:new.jh,p_data,'1');valuse -> values你拼错了
      

  6.   


    谢谢 是错了 水平真差 谢谢了怎有提示下面的错误呢ORA-03113: 通信通道的文件结束
      

  7.   


    create or replace trigger tri_bbeb
      after insert or delete or update on bbeb  
      for each row
      DECLARE
      p_count integer;
      p_data  date;
    begin
     if deleting then        select count(*) into p_count  from table_trigger  WHERE jh = :old.jh;     if p_count > 0 then
         
     delete  from table_trigger where jh=:old.jh;
          
      end if;  end if;  
      if INSERTING then
         
      SELECT SYSDATE into p_data FROM DUAL;
       
      select count(*) into p_count from table_trigger  WHERE jh = :new.jh;     if p_count = 0 then
         
     insert into table_trigger(sjbmc,jh,xgsj,bz) values ('buaa',:new.jh,p_data,'1');
          
      end if;  end if;
      
      if updating then    SELECT SYSDATE into p_data FROM DUAL;
       
      select count(*) into p_count from table_trigger  WHERE jh = :new.jh;     if p_count = 0 then
         
     insert into table_trigger(sjbmc,jh,xgsj,bz) values ('bbeb',:new.jh,p_data,'1');
          
      end if;  end if ;end tri_bbeb;