create or replace trigger TBL_DEMO_TRIGGER
before insert on TBL_DEMO
for each row
declare
-- local variables here
begin
select TBL_DEMO_SEQ.NEXTVAL into :TBL_DEMO.ID from DUAL;
end TBL_DEMO_TRIGGER;
Oracle
分享到:
------解决方案-------------------- select TBL_DEMO_SEQ.NEXTVAL into :TBL_DEMO.ID from DUAL;
改为
select TBL_DEMO_SEQ.NEXTVAL into :new.ID from DUAL;