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;

 

posted @ 2015-06-12 14:37  jiapeng  阅读(3483)  评论(0编辑  收藏  举报