有一张表onetable   字段有id, name; 
  
创建的序列
 CREATE SEQUENCE onetable_Sequence
 INCREMENT BY 1   -- 每次加几个  
     START WITH 1     -- 从1开始计数  
     NOMAXVALUE       -- 不设置最大值  
     NOCYCLE          -- 一直累加,不循环  
     CACHE 10; 创建触发器
CREATE TRIGGER onetable BEFORE
insert ON   onetable  FOR EACH ROW
  begin
select TestIncrease_Sequence.nextval into:New.id from dual;
  end;
 commit;
5 测试insert into onetable (name) values('test')为什么一添加就报   ORA-04098: 触发器 system.onetable 无效且未通过重新确认?????

解决方案 »

  1.   

    ORA-04098 trigger 'string.string' is invalid and failed re-validationCause: A trigger was attempted to be retrieved for execution and was found to be invalid. This also means that compilation/authorization failed for the trigger.Action: Options are to resolve the compilation/authorization errors, disable the trigger, or drop the trigger.
      

  2.   

    你建的序列名为:onetable_Sequence
    触发器中名为:TestIncrease_Sequence