Loading

plsql中常见的loop循环

--Integer for loop

for i in 1..10
loop
 ….
end loop;
-----------------------------------------------
--Implicit cursor loop
for c in (select )
loop
 ….
end loop;
-----------------------------------------------
--While loop
i:=5;
while i >10
loop
 i:=i+1;
 ...
end loop;
----------------------------------------------
--Basic loop
i:=5;
loop
 i:=i+1;
 ….
exit when i>10;
end loop;

 

 

posted @ 2021-09-15 09:19  李旭2018  阅读(500)  评论(1编辑  收藏  举报