爱问知识人 爱问教育 医院库

Oracle循环语句的写法有哪些呢?

首页

Oracle循环语句的写法有哪些呢?

Oracle循环语句的写法有哪些呢?

提交回答

全部答案

    2017-07-27 17:00:32
  •   如果您对Oracle循环语句方面感兴趣的话,不妨一看。
    loop循环:
    1。 create or replace procedure pro_test_loop is
    2。 i number;
    3。 begin
    4。 i:=0;
    5。
       loop 6。 ii:=i+1; 7。 dbms_output。put_line(i); 8。 if i》5 then 9。 exit; 10。 end if; 11。 end loop; 12。 end pro_test_loop; while循环: 1。
       create or replace procedure pro_test_while is 2。 i number; 3。 begin 4。 i:=0; 5。 while i《5 loop 6。 ii:=i+1; 7。 dbms_output。
      put_line(i); 8。 end loop; 9。 end pro_test_while; for循环1: 1。 create or replace procedure pro_test_for is 2。 i number; 3。
       begin 4。 i:=0; 5。 for i in 1。。5 loop 6。 dbms_output。put_line(i); 7。 end loop; 8。 end pro_test_for; for循环2: 1。 create or replace procedure pro_test_cursor is 2。
       userRow t_user%rowtype; 3。 cursor userRows is 4。 select * from t_user; 5。 begin 6。 for userRow in userRows loop 7。 dbms_output。
      put_line(userRow。Id||‘,’||userRow。Name||‘,’||userRows%rowcount); 8。 end loop; 9。 end pro_test_cursor;。

    李***

    2017-07-27 17:00:32

类似问题

换一换

相关推荐

正在加载...
最新资料 推荐信息 热门专题 热点推荐
  • 1-20
  • 21-40
  • 41-60
  • 61-80
  • 81-100
  • 101-120
  • 121-140
  • 141-160
  • 161-180
  • 181-200
  • 1-20
  • 21-40
  • 41-60
  • 61-80
  • 81-100
  • 101-120
  • 121-140
  • 141-160
  • 161-180
  • 181-200
  • 1-20
  • 21-40
  • 41-60
  • 61-80
  • 81-100
  • 101-120
  • 121-140
  • 141-160
  • 161-180
  • 181-200
  • 1-20
  • 21-40
  • 41-60
  • 61-80
  • 81-100
  • 101-120
  • 121-140
  • 141-160
  • 161-180
  • 181-200

热点检索

  • 1-20
  • 21-40
  • 41-60
  • 61-80
  • 81-100
  • 101-120
  • 121-140
  • 141-160
  • 161-180
  • 181-200
返回
顶部
帮助 意见
反馈

确定举报此问题

举报原因(必选):