As with other flow-control constructs, IF ... END
IF blocks may be nested within other flow-control
constructs, including other IF
statements. Each IF must be
terminated by its own END IF followed by a
semicolon. You can use indentation to make nested flow-control
blocks more easily readable by humans (although this is not
required by MySQL), as shown here: