You can use the LEAVE statement to exit a flow control statement with the specified label. If the label is used in the outermost stored program block, use the LEAVE statement to exit the program.
The syntax of the LEAVE statement is as follows:
LEAVE label
The LEAVE statement can be used in the BEGIN ... END block and the LOOP, REPEAT, and WHILE loop statements.