new或old引用不允许在表层触发器中

create trigger t_test before insert on testbegin
select s_test.nextval into :new.id from dual;
end;

改正为:
create trigger t_test before insert on test for each row
begin
select s_test.nextval into :new.id from dual;
end;


:new和:old是对等的后映像和前映像,它只能用在行触发器中

你可能感兴趣的:(触发器)