JUST DO IT ~

          我只想當個程序員

          for in () 循環 不喜歡用,因為不能人為控制游標的關閉。

          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-21 13:03 小高 閱讀(368) 評論(0)  編輯  收藏


          只有注冊用戶登錄后才能發表評論。


          網站導航:
           

          導航

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

          統計

          常用鏈接

          留言簿(3)

          隨筆分類(352)

          收藏夾(19)

          關注的blog

          手冊

          搜索

          積分與排名

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 政和县| 韶关市| 祁阳县| 郁南县| 班玛县| 新化县| 毕节市| 韩城市| 蓬溪县| 仪征市| 西乡县| 含山县| 双流县| 香港 | 綦江县| 普洱| 防城港市| 石家庄市| 金湖县| 汉阴县| 友谊县| 漳州市| 罗田县| 灵川县| 漳浦县| 呼伦贝尔市| 汉寿县| 宁远县| 文成县| 东明县| 济宁市| 阜阳市| 铁岭市| 甘肃省| 全南县| 喀喇| 来凤县| 阳泉市| 江安县| 伊金霍洛旗| 通海县|