SHOW CREATE FUNCTION func_name
The SHOW CREATE FUNCTION statement returns the CREATE FUNCTION statement that would recreate the specified stored function. The result includes the function body and relevant attributes (such as character set and collation settings in effect when the function was defined).
For more information, see the MySQL documentation: SHOW CREATE FUNCTION Statement.