create sequence t_skyquality_seq
minvalue 1
NOMAXVALUE
increment by 1
start with 1
NOCYCLE
cache 20;
CREATE or replace TRIGGER t_skyquality_trigger
BEFORE INSERT ON t_skyquality FOR EACH ROW WHEN (new.id is null)
begin
select t_skyquality_seq.nextval into: new.id from dual;
end;
在随便插入个数据时,就出现了“通信通道的文件结束”错误,最后pl/sql死掉。。
------解决方案--------------------
------解决方案--------------------
select t_skyquality_seq.nextval into: new.id from dual; 这句改成 select t_skyquality_seq.nextval into :new.id from dual; 注意冒号位置
------解决方案--------------------