主题:oracle触发器运行报错,请大家帮忙
触发器运行报错,试了很多次,还是解决不了 请大家帮忙
create or replace trigger emptr
after insert
on emp
for each row
begin
if :new.deptno>77 then
dbms_output.put_line("deptno is error");
end if;
end;
/
错误如下:
SQL> delete from scott.dept;
delete from scott.dept
*
ERROR 位于第 1 行:
ORA-20001: 不能删除
ORA-06512: 在"SCOTT.TR_DEL", line 3
ORA-04088: 触发器 'SCOTT.TR_DEL' 执行过程中出错
create or replace trigger emptr
after insert
on emp
for each row
begin
if :new.deptno>77 then
dbms_output.put_line("deptno is error");
end if;
end;
/
错误如下:
SQL> delete from scott.dept;
delete from scott.dept
*
ERROR 位于第 1 行:
ORA-20001: 不能删除
ORA-06512: 在"SCOTT.TR_DEL", line 3
ORA-04088: 触发器 'SCOTT.TR_DEL' 执行过程中出错