zoukankan      html  css  js  c++  java
  • pl/sql 实例精解 06

    1. 简单循环

       1:  LOOP
       2:    statement1;
       3:    statement2;
       4:    EXIT WHEN condition;
       5:  END LOOP;
       6:  statement3;

    也可以使用 IF 语句来限制 exit 的条件.

    if condition then

      exit;

    end if;

    2. while 循环

       1:  while condition loop
       2:    statement1;
       3:    statement2;
       4:    ...
       5:    statementN;
       6:  end loop;

    3. FOR 数值型循环

       1:  FOR loop_counter IN [REVERSE] lower_limit .. upper_limit LOOP
       2:    statement1;
       3:    statement2;
       4:    ...
       5:    statementN;
       6:  END LOOP;

    reverse: 是 5,4,3,2,1 这样倒序

    注意: 可以在循环体内使用 IF condition then exit 来提前终止循环, 但是这不是好的编程习惯.

  • 相关阅读:
    移动支付
    PowerBI
    PowerBI
    Fiddler 页面字段(图标)含义详解
    Fiddler 抓包淘宝小程序(Android)
    【练习读写excel文件】读取sheet1里面a列的值,逐行粘贴到sheet2,3,4,5,6,7里面的指定字段
    【练习读写excel文件】根据某一字段将相同的类拆分
    【练习读写excel文件】创建workbook和批量创建Sheet
    require.js的使用的坑!
    js的异步的问题的再次理解
  • 原文地址:https://www.cnblogs.com/moveofgod/p/3652116.html
Copyright © 2011-2022 走看看