--plsql异常的处理
declare
pnum number;
begin
pnum:=1/0;
exception
when Zero_Divide then
dbms_output.put_line('0不能被除。。。。。。。。。。。。。');
dbms_output.put_line('0不能被除。。。。。。。。。。。。。');
when Value_error then dbms_output.put_line('算数书屋。。。。。。。。');
when others then dbms_output.put_line('抛出其他异常。。。。。。。。');
end;
declare
pnum number;
begin
pnum:=1/0;
exception
when Zero_Divide then
dbms_output.put_line('0不能被除。。。。。。。。。。。。。');
dbms_output.put_line('0不能被除。。。。。。。。。。。。。');
when Value_error then dbms_output.put_line('算数书屋。。。。。。。。');
when others then dbms_output.put_line('抛出其他异常。。。。。。。。');
end;