The optional ELSE keyword will execute the SQL statement(s) that follow when the IF condition is not satisfied (FALSE). The IF…ELSE Statement is generally used in a SQL procedure or trigger.

Syntax

Example

If one SQL statement follows the IF or ELSE block, the BEGIN and END keywords are optional.