触发器语句如下:
create or replace trigger count_trigger
before insert or update or delete
on count
begin
insert into count_log(
who,when)
values(
user,sysdate);
end;
报错:
Compilation errors for TRIGGER TEST.COUNT_TRIGGERError: PLS-00103: Encountered the symbol "WHEN" when expecting one of the following:
<an identifier> <a double-quoted delimited-identifier>
The symbol "<an identifier> was inserted before "WHEN" to continue.
Line: 7
Text: who,when)我单独测试了一次insert into count_log(who,when) values(user,sysdate); 是可以实现的~ 有人可以指点一下报错原因么 ?
create or replace trigger count_trigger
before insert or update or delete
on count
begin
insert into count_log(
who,when)
values(
user,sysdate);
end;
报错:
Compilation errors for TRIGGER TEST.COUNT_TRIGGERError: PLS-00103: Encountered the symbol "WHEN" when expecting one of the following:
<an identifier> <a double-quoted delimited-identifier>
The symbol "<an identifier> was inserted before "WHEN" to continue.
Line: 7
Text: who,when)我单独测试了一次insert into count_log(who,when) values(user,sysdate); 是可以实现的~ 有人可以指点一下报错原因么 ?
insert into count_log(
"who","when")
values(
user,sysdate);
when 是PLSql 的保留字,你的字段名也是 when,冲突了。