SHOW CREATE {PROCEDURE | FUNCTION} sp_name
These statements are MySQL extensions. Similar to SHOW
CREATE TABLE, they return the exact string that can be
used to re-create the named routine. The statements require that
you be the owner of the routine or have
SELECT access to the
mysql.proc table. If you do not have
privileges for the routine itself, the value displayed for the
Create Procedure or Create
Function field will be NULL.
mysql> SHOW CREATE FUNCTION test.hello\G
*************************** 1. row ***************************
Function: hello
sql_mode:
Create Function: CREATE FUNCTION `test`.`hello`(s CHAR(20)) RETURNS CHAR(50)
RETURN CONCAT('Hello, ',s,'!')

User Comments
Add your own comment.