oracle 参考
create or replace function fun_try(v_name varchar,v_outname out varchar)
return varchar2 is Result varchar2(200);
begin
select smenuname,smenuname into Result,v_outname from sm_menus where smenucode = 'GL01';
v_outname :=Result;
return(Result);
end fun_try;
create or replace function fun_try(v_name varchar)
return varchar2 is Result varchar2(200);
begin
select smenuname into Result from sm_menus where smenucode = 'GL01';
--v_outname :=Result;
return(Result);
end fun_try;
select fun_try('1') from dual
begin
var v_outname varchar2(20)
var dname varchar2(20)
exec :dname:=fun_try('SCOTT',:v_outname)
print(:v_outname)
end;