CREATE OR REPLACE procedure LEASE.p1
(a in number,b in number) is
lvEx exception;
begin
if b=0 then
raise lvEx;
end if;
dbms_output.put_line('A/B =' || a/b);
exception
when others then
dbms_output.put_line('Error:B is 0');
end;
(a in number,b in number) is
lvEx exception;
begin
if b=0 then
raise lvEx;
end if;
dbms_output.put_line('A/B =' || a/b);
exception
when others then
dbms_output.put_line('Error:B is 0');
end;
set serveroutput on;
dbms_output.put_line才起作用