JUST DO IT ~

我只想当个程序员

oracle for while 区别

-- Created on 2007-12-14 by GDDG 
declare 
  
-- Local variables here
  i integer:= 1 ;
   g 
int := 5 ;
begin
           
for i in 1..g
           loop    
           dbms_output.put_line (
'i:'|| i );  
           
               g :
= g - 1 ;
           
         
           
end loop ;
           
           
       g:
=10;
       
                    
        
while  g > 0 
        loop 
         dbms_output.put_line (
'g:'|| g );   
         
         g :
= g-1 ;
        
end loop ;
        
        
  
end;




i:1
i:2
i:3
i:4
i:5



g:10
g:9
g:8
g:7
g:6
g:5
g:4
g:3
g:2
g:1











posted on 2007-12-14 13:20 小高 阅读(692) 评论(0)  编辑  收藏 所属分类: Oracle


只有注册用户登录后才能发表评论。


网站导航:
 

导航

<2007年12月>
2526272829301
2345678
9101112131415
16171819202122
23242526272829
303112345

统计

常用链接

留言簿(3)

随笔分类(352)

收藏夹(19)

关注的blog

手册

搜索

积分与排名

最新评论

阅读排行榜

评论排行榜