zoukankan      html  css  js  c++  java
  • 条件控制(if ) ( case)

    一:IF应用格式

    (1)                  (2)                (3)

    IF 条件 THEN           IF 条件 THEN            IF 条件1 THEN

      --代码块                     --代码块                 --代码块1

      commit;              commit;                commit;

      dbms_output.put_line();      dbms_output.put_line();       dbms_output.put_line();

    ENDIF;                 ELSE                ELSIF 条件2 THEN

                        dbms_output.put_line();          --代码块2

                        ENDIF;               ELSE

                                            dbms_output.put_line();

                                              ENDIF;

    二:case应用格式

    (1)  只可用在等值情况

    case 列名

      when 值 then

        --(定义变量 提示的 值)

      when 值 then

        --(定义变量 提示的 值)

            ……

        end case;

      dbms_output.put_line(定义变量);

    (2):可用在等值情况  和 不等着情况

    case 列名

      when 列名=值 then

        --(定义变量 提示的 值)

      when 列名=值 then

        --(定义变量 提示的 值)

            ……

        end case;

      dbms_output.put_line(定义变量);

  • 相关阅读:
    c# udp局域网通信
    wpf 空白汉字占位符
    直角三角形知道变长求夹角
    windowsphone 的IsolatedStorageSettings存储类型
    WPFUIElement的Background的问题
    oracle外表
    oracle安装
    数据库ddl,dml,dcl
    OLTP与OLAP的介绍
    四种XML解析方式详解
  • 原文地址:https://www.cnblogs.com/futao123/p/4437419.html
Copyright © 2011-2022 走看看