Oracle存储过程中传入参数,传出字符串

create or replace procedure getStr(usercode in varchar2,str out varchar2)

is

v_sql varchar2(100);

isEdit varchar2(2);

isAdmin varchar2(2);

begin

  v_sql:='select isedit,isadmin from f_user_access where usercode=:usercode';

 execute immediate v_sql into isEdit,isAdmin using usercode;--为多个变量同时赋值

  str:='{isEdit:'||isEdit||',isAdmin:'||isAdmin||'}';

end getStr;

 

你可能感兴趣的:(oracle存储过程)