create or replace procedure A is
begin
if B('ok') then
dbms_output.put_line('right');
else
dbms_output.put_line('error');
end if;
end;create or replace function B(str varchar2) return boolean is
begin
return str='ok';
end;
begin
if B('ok') then
dbms_output.put_line('right');
else
dbms_output.put_line('error');
end if;
end;create or replace function B(str varchar2) return boolean is
begin
return str='ok';
end;
请问怎么用呢?给个语句 ?谢谢
result boolean;
begin
reuslt:=B('ok');
if result then
dbms_output.put_line('right');
else
dbms_output.put_line('error');
end if;
end;create or replace function B(str varchar2) return boolean is
begin
return str='ok';
end;方法二:使用带返回值的过程create or replace procedure A is
result boolean;
begin
B('ok',result);
if result then
dbms_output.put_line('right');
else
dbms_output.put_line('error');
end if;
end;create or replace procedure B(str varchar2,re out boolean) is
begin
re:=str='ok';
end;
但是在SQL SERVER 中有系统返回的值,不需要自定义变量也可得到返回的值。在这点上他们是不是有差别。