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 小高 阅读(6042) 评论(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

手册

搜索

积分与排名

最新评论

阅读排行榜

评论排行榜