【发布时间】:2018-03-21 09:15:37
【问题描述】:
我有一个空白表,我已经为其设置了触发器:
CREATE OR REPLACE TRIGGER authors_bir
BEFORE INSERT ON authors
FOR EACH ROW
begin
if upper(:new.name) = 'TEST' then
raise_application_error(-20001, 'Sorry, that value is not allowed.');
end if;
end;
执行后:
insert into AUTHORS
VALUES (1, 'test', '1-Jan-1989', 'M');
为什么除了预期的 ORA-20001 错误提示之外,我还会收到 ORA-06512 和 ORA-04088 错误消息?
错误消息
Error starting at line : 5 in command -
insert into AUTHORS
VALUES (1, 'test', '1-Jan-1989', 'M')
Error report -
ORA-20001: Sorry, that value is not allowed.
ORA-06512: at "RPS.AUTHORS_BIR", line 3
ORA-04088: error during execution of trigger 'RPS.AUTHORS_BIR'
【问题讨论】:
-
向我们展示作者的架构。
-
@anonyXmous 希望这就是您要找的东西? pastebin.com/X6usMe7m