CREATE SEQUENCE DATA_CHANGE_ID INCREMENT BY 1 START WITH 1
MAXVALUE 999999999 MINVALUE 1 NOCYCLE
NOCACHE NOORDER
create or replace trigger DATAADD
before insert on DATA_CHANGE_RECORD
for each row
begin
new.CHANGEID=DATA_CHANGE_ID.nextval;
end;
穿件触发器报错了,请问这几句话有错吗
------解决方案--------------------
sequence 不能这么用吧。
应该
SELECT DATA_CHANGE_ID.NEXTVAL INTO :NEW.CHANGEID FROM DUAL;
------解决方案--------------------
+1
------解决方案--------------------
create or replace trigger DATAADD
before insert on DATA_CHANGE_RECORD
for each row
begin
new.CHANGEID := DATA_CHANGE_ID.nextval;
end;