MySQL :: MySQL 8.0 Reference Manual :: 15.6.5.7 RETURN Statement (original) (raw)
15.6.5.7 RETURN Statement
RETURN expr
The RETURN statement terminates execution of a stored function and returns the value_expr
_ to the function caller. There must be at least one RETURN statement in a stored function. There may be more than one if the function has multiple exit points.
This statement is not used in stored procedures, triggers, or events. The LEAVE statement can be used to exit a stored program of those types.