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;