---基本循环
declare
v1 number(2) :=1;
begin
loop
dbms_output.put_line(v1);
v1:=v1+1;
exit when v1>10; --if v1>10 then exit; end if;
end loop;
end ;
--while 循环
declare
v1 number(2) :=1;
begin
while v1<10
loop
dbms_output.put_line(v1);
v1:=v1+1;
end loop;
end ;
--for 循环
declare
v1 number(2) :=1;
begin
for v1 in 1..9
loop
dbms_output.put_line(v1);
end loop;
end ;