欧美日韩一区二区高清,久久视频这里只有精品,超黄网站在线观看,成人av影院在线观看

Rss & SiteMap

曙海教育集團(tuán)論壇 http://www.bjzhda.cn

曙海教育集團(tuán)論壇
共1 條記錄, 每頁顯示 10 條, 頁簽: [1]
[瀏覽完整版]

標(biāo)題:Oracle PLSQL中用pro進(jìn)行 BULK COLLECT 的高效率查詢處理

1樓
wangxinxin 發(fā)表于:2010-12-11 11:09:53
過程樣例:
create or replace procedure real_user as
  c_count number(10);
begin

  DECLARE
    TYPE mobile_type IS TABLE OF mobile_dabenying.mobile%TYPE;  --按表字段類型來定義變量類型
    t_mobile mobile_type := mobile_type();
  
  BEGIN
    select mobile BULK COLLECT  --批量選擇數(shù)據(jù)
      INTO t_mobile
      from (select mobile from mobile_dabenying order by mobile);
  
    if (t_mobile.COUNT > 0) then
      FOR i IN t_mobile.FIRST .. t_mobile.LAST LOOP
      
        select count(*)  --從號段中過濾
          into c_count
          from mobile_region
         where t_mobile(i) between start_mobile and end_mobile;
      
        if (c_count > 0) then
          c_count := 0;
          insert into mobile_dabenying2 (mobile) values (t_mobile(i));  --真實(shí)用戶
        else
          dbms_output.put_line(t_mobile(i));
          insert into mobile_dabenying3 (mobile) values (t_mobile(i));  --假用戶
        end if;
      
      END LOOP;
    end if;
  
  END;

end;
共1 條記錄, 每頁顯示 10 條, 頁簽: [1]

Copyright © 2000 - 2009 曙海教育集團(tuán)
Powered By 曙海教育集團(tuán) Version 2.2
Processed in .01563 s, 2 queries.
主站蜘蛛池模板: 江都市| 曲周县| 安庆市| 冀州市| 太康县| 图片| 丹东市| 镇赉县| 双流县| 诏安县| 涿州市| 东方市| 五大连池市| 昭苏县| 毕节市| 慈溪市| 淄博市| 大英县| 井研县| 太和县| 鄄城县| 宜兴市| 武夷山市| 哈巴河县| 镇远县| 梧州市| 马山县| 辽阳市| 连平县| 中卫市| 博爱县| 垣曲县| 壶关县| 吉木乃县| 射阳县| 读书| 长春市| 北安市| 霍城县| 梁平县| 辰溪县|