8. SQL Statements : IF - THEN - ELSE : Description : If Statement
 
Share this page                  
If Statement
The simplest form of the IF statement performs an action if the Boolean expression evaluates to true. The syntax follows:
IF boolean_expr THEN
       statement; {statement;}
ENDIF
If the Boolean expression evaluates to true, the list of statements is executed. If the expression evaluates to false (or unknown), the statement list is not executed and control passes directly to the statement following the ENDIF statement.