SQL> declare
2 i number := 0;
3 begin
4 loop
5 dbms_output.put_line(i);
6 i := i+1;
7 exit when i = 10;
8 end loop;
9 end;
10 /
0
1
2
3
4
5
6
7
8
9
PL/SQL procedure successfully completed.
SQL> declare
2 i number := 0;
3 begin
4 loop
5 i := i+1;
6 dbms_output.put_line(i);
7 exit when i = 10;
8 end loop;
9 end;
10 /
1
2
3
4
5
6
7
8
9
10
PL/SQL procedure successfully completed.
时间: 2025-01-03 07:59:09