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 小高 閱讀(6107) 評論(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

          手冊

          搜索

          積分與排名

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 韶关市| 延安市| 晋城| 贵港市| 南郑县| 武宣县| 河东区| 将乐县| 临泉县| 定南县| 蒙城县| 双辽市| 同江市| 林口县| 东丽区| 外汇| 湟中县| 贵州省| 绥宁县| 丹东市| 正宁县| 雷州市| 铜山县| 城固县| 建湖县| 都江堰市| 闽侯县| 拉萨市| 辽宁省| 卓尼县| 通许县| 屏东县| 望奎县| 德庆县| 安龙县| 鹤庆县| 三江| 青海省| 观塘区| 鹿泉市| 固安县|