JUST DO IT ~

          我只想當個程序員

          數組集合 type 類型 is table of 表 %rowtype index by binary_integer;



          create or replace procedure sp_test_for   is

            type tbl_cmndict   
          is table of cmn_dict%rowtype index by binary_integer;
            cmndicts  tbl_cmndict;
            i 
          int:= 1  ; 
            
            e cmn_dict
          %rowtype  ; 
            
            
             
          begin 
           
                
          for tmprow in (  select  * from  cmn_dict  where dicid_ = '1009' order by  diccode_  ) loop
                  
                cmndicts(i) :
          = tmprow  ;
                i :
          =i+1 ;
                
                
          end loop;
                
                
          for i  in 1..cmndicts.count  
                loop 
                  e  :
          = cmndicts(i);
                   
                  dbms_output.put_line( 
          'dicid_ :'  ||   e.dicid_ ||' diccode_ : '||e.diccode_ || '  dicname_ :' || e.dicname_  ); 
                
                
          end loop ;
                
                
                

          end ;

          posted on 2008-01-04 21:42 小高 閱讀(6117) 評論(1)  編輯  收藏 所屬分類: Oracle

          評論

          # re: 數組集合 type 類型 is table of 表 %rowtype index by binary_integer; 2009-05-20 11:05 路海峰

          謝謝 正需要這個呢  回復  更多評論   

          導航

          <2008年1月>
          303112345
          6789101112
          13141516171819
          20212223242526
          272829303112
          3456789

          統計

          常用鏈接

          留言簿(3)

          隨筆分類(352)

          收藏夾(19)

          關注的blog

          手冊

          搜索

          積分與排名

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 蒙自县| 长岭县| 边坝县| 古蔺县| 离岛区| 彭州市| 海淀区| 县级市| 鹤庆县| 邵阳县| 甘孜县| 沭阳县| 元阳县| 昌宁县| 伊春市| 郑州市| 萝北县| 弋阳县| 临朐县| 永福县| 汝城县| 武隆县| 广饶县| 安顺市| 福海县| 桃园市| 广灵县| 牙克石市| 沂水县| 辉南县| 志丹县| 保康县| 大名县| 洛浦县| 加查县| 大庆市| 平塘县| 应用必备| 白河县| 公安县| 南投县|