Outdated Version

You are viewing an older version of this section. View current production version.

SHOW CREATE FUNCTION

Outputs configuration information about an existing user-defined function or procedure, including user-defined scalar value functions (UDFs), user-defined table-valued functions (TVFs), and stored procedures (SPs).

SHOW CREATE PROCEDURE is an alias for this command.

Syntax

SHOW CREATE FUNCTION { function_name | database_name.function_name }

Example

The following example demonstrates how to see the configuration of an existing UDF named plus_one while connected to the current database.

SHOW CREATE FUNCTION plus_one\G;
*************************** 1. row ***************************
            Function: plus_one
     Create Function: CREATE FUNCTION `plus_one`(a int(11) NULL) RETURNS int(11) NULL AS
  BEGIN
    RETURN a + 1;
  END;
character_set_client: utf8
collation_connection: utf8_general_ci
1 row in set (0.00 sec)

Related Topics