IF 语句

You are viewing an old version of this article. View the current version here.

语法结构:

IF search_condition THEN statement_list
    [ELSEIF search_condition THEN statement_list] ...
    [ELSE statement_list]
END IF

解释说明

if语句实现基本的条件判断功能。如果search_condition判断为真,将执行对应的statement_list部分。如果没有条件符合,最后将执行ELSE部分。每个statement_list都由一个或者多个语句组成。

注意: IF() 函数不同于IF语句。

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.