Oracle函数
create or replace function GET_ORG_NM(in_org_id number) return varchar2 is --传入参数不能与表字段冲突
out_org_nm varchar2(200); --varchar2(200)括号内加长度限制,否则报错"00215字符串长度限制在范围"
begin
select a.org_nm into out_org_nm from TB_AX099 a where a.org_id = in_org_id ;--sql最后要加分号
--当多个输出参数时: select id,nm into out_id,out_nm from table
return(out_org_nm);
end GET_ORG_NM;