`

简单循环

 
阅读更多
create or replace procedure jdxh_test(start_in pls_integer,end_in pls_integer) is
init_a pls_integer :=start_in;
begin
loop
exit when init_a > end_in;
dbms_output.put_line(init_a);
init_a:=init_a+1;
end loop;
end jdxh_test;

 

  简单循环:是因为它仅是以loop关键字开始,以end loop语句结束,靠循环体内的exitexit when退出循环。

pls_integer 可以改成int

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics