定義:
?type t_numberstab is table of number;
舉例:
create or replace function getbldroomidforcert(p_certid number,p_sequence number) return varchar2
is
?type t_numberstab is table of number;
?v_bldroomids t_numberstab:=t_numberstab();
?v_cnt????????? number:=1;
begin
?for brrs in (select bldroomid,(select buildno from building where buildid=bldroom.buildid) buildno,getbrfloors(bldroomid) flooron,getbldroompart(bldroomid) part from bldroom where bldroomid in (select bldroomid from rightcertroom where certid=p_certid and exists (select 1 from rightcert where certid=p_certid and activeid=createactiveid)) order by buildno,flooron,part)
?loop
??v_bldroomids.extend;
??v_bldroomids(v_cnt):=brrs.bldroomid;
??v_cnt:=v_cnt+1;
?end loop;
?if v_bldroomids.exists(p_sequence) then
??return v_bldroomids(p_sequence);
?else
??return -1;
?end if;
end getbldroomidforcert;
/
show err;
更多文章、技術交流、商務合作、聯系博主
微信掃碼或搜索:z360901061

微信掃一掃加我為好友
QQ號聯系: 360901061
您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。
【本文對您有幫助就好】元
