[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
IF
Statement
IF search_condition THEN statement(s) [ELSEIF search_condition THEN statement(s)] ... [ELSE statement(s)] END IF |
IF
implements a basic conditional construct. If the
search_condition
evaluates to true, the corresponding SQL statement is
executed. If no search_condition
matches, the statement in the
ELSE
clause is executed.
Please note that there is also an IF()
function.
See section 12.1.4 Control Flow Functions.