RDBMS Type: MySQL
IF search_condition THEN statement_list
[ELSEIF search_condition THEN statement_list] ...
The IF statement for stored programs implements a basic conditional
There is also an IF() function, which differs from the IF statement
described here. See
The IF statement can have THEN, ELSE, and ELSEIF clauses, and it is
terminated with END IF.
If a given search_condition evaluates to true, the corresponding THEN
or ELSEIF clause statement_list executes. If no search_condition
matches, the ELSE clause statement_list executes.
Each statement_list consists of one or more SQL statements; an empty
statement_list is not permitted.