我想在触发器里加个错误处理,不管发生什么错误直接跳到错误处理
exception when others
.........;end;
像我这用行吗?直接就others
我看网上都是这样用的
Exception
when NO_Data_Found Then
.........;
When Others then --其他未知异常
......... ;
End;
exception when others
.........;end;
像我这用行吗?直接就others
我看网上都是这样用的
Exception
when NO_Data_Found Then
.........;
When Others then --其他未知异常
......... ;
End;
v_name a.name%type;begin
select nameinto v_name from a where id = 'mm';-- mm is not existed.
exception
when others then
v_name := 'TT';
dbms_output.put_line(v_name);
end;输出:
TT