存过成败有输出
--存过功能,判断存过是否执行成功,没有正常执行完成输出0
create or replace procedure abc(y in out varchar2) is
x varchar2(2000);
begin
x := 'drop table a01';
execute immediate x;
commit;
y := '1';
dbms_output.put_line(y);
exception
when others then
y := '0';
dbms_output.put_line(y);
end;
--验证
declare x varchar2(6);begin abc(x); end;

浙公网安备 33010602011771号