打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
oracle pl/sql 函数中链表的使用
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;
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
Oracle经验技巧集
oracle如何查看已创建的序列?
求一句SQL ,分组后排序
Wikipedia,--Jaccard index - 很清晰的介绍
[精彩] 请教关于rowid的几个问题
oracle 找出重复行
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服