日韩国产欧美精品一区二区三区,亚洲男女自偷自拍图片另类,亚洲欧美久久久,亚洲国产成人一区

Rss & SiteMap

曙海教育集團論壇 http://www.bjzhda.cn

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

標題:Oracle PLSQL中用pro進行 BULK COLLECT 的高效率查詢處理

1樓
wangxinxin 發表于: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  --批量選擇數據
      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));  --真實用戶
        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 曙海教育集團
Powered By 曙海教育集團 Version 2.2
Processed in .01563 s, 2 queries.
主站蜘蛛池模板: 平定县| 旌德县| 信丰县| 江都市| 青河县| 申扎县| 黑龙江省| 泸定县| 东山县| 元江| 云阳县| 阳信县| 普兰县| 嘉定区| 夏河县| 五寨县| 湖南省| 延吉市| 玉龙| 柳河县| 安义县| 新干县| 樟树市| 宜春市| 金山区| 鹤岗市| 墨竹工卡县| 资阳市| 汝阳县| 寻乌县| 周宁县| 邯郸县| 瑞丽市| 广州市| 建德市| 卓尼县| 漳州市| 三台县| 林口县| 泰和县| 鸡西市|