我几天遇到这个问题,我从power designer生成以下sql,并在oracle运行它,但是它会抛出错误“Warning:Trigger created with compilation errors。”。
drop trigger "tib_material_classify"
/
create trigger "tib_material_classify" before insert
on "material_classify" for each row
declare
integrity_error exception;
errno integer;
errmsg char(200);
dummy integer;
found boolean;
begin
-- column ""id"" uses sequence "seq_material_classify"
select "seq_material_classify".Nextval into :new."id" from dual;
-- errors handling
exception
when integrity_error then
raise_application_error(errno, errmsg);
end;
/
和我显示错误,它抛出以下,我不知道我做错了什么,我需要你的帮助。非常感谢!
PL/SQL: SQL Statement ignored
10/12 PL/SQL: ORA-02289: sequence does not exist