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 来提前终止循环, 但是这不是好的编程习惯.

  • 相关阅读:
    WRF WPS预处理
    CVS安装
    Linux窗口最小化消失,任务栏上无法找到的解决方法
    NCARG安装配置出现error while loading shared libraries: libg2c.so.0问题额解决办法
    Netcdf安装
    Embedding R-generated Interactive HTML pages in MS PowerPoint(转)
    The leaflet package for online mapping in R(转)
    Some 3D Graphics (rgl) for Classification with Splines and Logistic Regression (from The Elements of Statistical Learning)(转)
    What does a Bayes factor feel like?(转)
    Weka算法介绍
  • 原文地址:https://www.cnblogs.com/moveofgod/p/3652116.html
Copyright © 2011-2022 走看看