循环语句示例:
输出数字1~10。
declare
id number:=0;
begin loop
id:=id+1;
exit when id>10;
dbms_output.put_line(id);
end loop;
end;
declare
i number;
begin
i := 1;
while i<=100 loop
dbms_output.put_line(i);
i := i+1;
end loop;
end;
declare
i number;
begin
for i in 1..100
loop
dbms_output.put_line(i);
end loop;
end;