create or replace trigger test_trigger 
after insert on saler.tjy001 for each row
begin    
   select user_style_id,tele_type,user_style from tjy001
   insert into tjy002(user_style_id,tele_type,user_style);
end;
提示信息:
      PLS-00103: ³öÏÖ·ûºÅ "END"ÔÚÐèÒªÏÂÁÐ֮һʱ£º
      .,@;returnreturning
      <an identifier><a double-quoted delimited-identifier>group
      havingintersectminuspartitionstartsubpartitionunionwhere
      connectSAMPLE_
      符号";"被替换为"end"后继续

解决方案 »

  1.   

    sql语句的语法好像有错误. 看你的意思应该是用select ... into ...语句吧? 哪有select ... insert into ...这样用的?
      

  2.   

    create or replace trigger test_trigger 
    after insert on saler.tjy001 for each row
    begin    
       insert into tjy002(user_style_id,tele_type,user_style)
       select user_style_id,tele_type,user_style from tjy001;
    end;
      

  3.   

    语法有误,应该用select ... insert into ...
      

  4.   

    没见过,oracle还支持这种写法么?
      

  5.   

    改过以后没有了这个编译没有错误了,但执行时又发生了这个错误.
    ERROR  位于第一行
    ORA-04091: 表saler.tjy001发生了变化,触发器/函数不能读,
    ORA-06512: 在SALER.TEST_TRIGGER", line 2
    ORA-04088: 触发器'SALER.TEST_TRIGGER' 在执行过程中出错
      

  6.   

    去掉for each row 就行了,不知道你的需求具体是什么
      

  7.   

    加上for each row和去掉它有什么区别?
    那儿有关于trigger的电子文档?
      

  8.   

    for each row 
    表示每行都执行触发器;而去掉则一次批量只执行一次;