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


曙海教育集團論壇開發語言培訓專區Oracle數據庫 → Oracle PLSQL中用pro進行 BULK COLLECT 的高效率查詢處理


  共有9959人關注過本帖樹形打印

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

美女呀,離線,留言給我吧!
wangxinxin
  1樓 個性首頁 | 博客 | 信息 | 搜索 | 郵箱 | 主頁 | UC


加好友 發短信
等級:青蜂俠 帖子:1393 積分:14038 威望:0 精華:0 注冊:2010-11-12 11:08:23
Oracle PLSQL中用pro進行 BULK COLLECT 的高效率查詢處理  發帖心情 Post By: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;

支持(0中立(0反對(0單帖管理 | 引用 | 回復 回到頂部

返回版面帖子列表

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








簽名
主站蜘蛛池模板: 腾冲县| 定兴县| 商城县| 两当县| 固安县| 墨竹工卡县| 秦安县| 吉木萨尔县| 胶南市| 淮北市| 永善县| 玛曲县| 正镶白旗| 峨山| 新竹市| 沙洋县| 石渠县| 绥棱县| 府谷县| 北辰区| 连南| 惠水县| 翁牛特旗| 彭山县| 信阳市| 昌图县| 清涧县| 舒兰市| 江陵县| 和政县| 南召县| 宾川县| 平凉市| 阿克| 尉犁县| 库车县| 通道| 农安县| 通道| 谢通门县| 黄梅县|