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

  • 相关阅读:
    洛谷1462 通往奥格瑞玛的道路 二分+spfa
    NumPy 排序、条件刷选函数
    NumPy 统计函数
    2019-3-10——生成对抗网络GAN---生成mnist手写数字图像
    python if __name__ == 'main' 的作用和原理()
    Python os.getcwd()
    numpy.random.uniform()
    tf.trainable_variables()
    tf.layers.dense()
    彻底弄懂tf.Variable、tf.get_variable、tf.variable_scope以及tf.name_scope异同
  • 原文地址:https://www.cnblogs.com/moveofgod/p/3652116.html
Copyright © 2011-2022 走看看