IF search_condition THEN statement_list [ELSEIF search_condition THEN statement_list] ... [ELSE statement_list] END IF;
IF
implements a basic conditional construct. If the search_condition
evaluates to true, the corresponding SQL statement list is executed. If no search_condition
matches, the statement list in the ELSE
clause is executed. Each statement_list consists of one or more statements.
IF
statement described above.
© 2019 MariaDB
Licensed under the Creative Commons Attribution 3.0 Unported License and the GNU Free Documentation License.
https://mariadb.com/kb/en/if/