兰保明

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
 1 set serveroutput on
2 declare
3 A integer:=1;
4 B integer:=23;
5 I integer:=0;
6 begin
7 --循环结构
8 --注意:PL/SQL程序块中的变量时不区分大小写的
9 loop
10
11 A:=A+1;
12 if A=B then
13 exit;
14 else
15 I:=I+1;
16 end if;
17
18 end loop;
19 dbms_output.put_line('一共循环次数为:'||to_char(i));
20 end;

posted on 2011-07-15 20:15  兰保明  阅读(192)  评论(0编辑  收藏  举报