使用navicat12以下版本:建触发器报错 [Err] ORA-24344: 成功, 但出现编译错误
一个现象,在Navicat 12以下版本中,建触发器报错 [Err] ORA-24344: 成功, 但出现编译错误
例如:
create or replace trigger xxx
before insert or delete or update on xxx
for each row
begin
if inserting then
:new.modify_time := sysdate;
elsif updating then
:new.modify_time := sysdate;
elsif Deleting then
insert into atongbu_id_del(table_name, col1, modify_time)values('xxx', :old.ID, sysdate);
end if;
end;
解决办法 : 最后一个 END 要和前一行语句在写同一行,不能单写, 改成
create or replace trigger xxx
before insert or delete or update on xxx
for each row
begin
if inserting then
:new.modify_time := sysdate;
elsif updating then
:new.modify_time := sysdate;
elsif Deleting then
insert into atongbu_id_del(table_name, col1, modify_time)values('xxx', :old.ID, sysdate);
end if; end;