SHOW CREATE FUNCTION
Retrieve the CREATE FUNCTION statement. This statement shows the exact SQL used to define a stored function, including its body and characteristics.
Syntax
SHOW CREATE FUNCTION func_nameDescription
This statement is similar to SHOW CREATE PROCEDURE but for stored functions.
SHOW CREATE FUNCTION quotes identifiers, according to the value of the sql_quote_show_create system variable.
SHOW CREATE FUNCTION quotes identifiers, according to the value of the sql_quote_show_create system variable. However, the output of this statement is unreliably affected by the sql_quote_show_create system variable.
Example
SHOW CREATE FUNCTION VatCents\G *************************** 1. row *************************** Function: VatCents sql_mode: Create Function: CREATE DEFINER=`root`@`localhost` FUNCTION `VatCents`(price DECIMAL(10,2)) RETURNS int(11) DETERMINISTIC BEGIN DECLARE x INT; SET x = price * 114; RETURN x; END character_set_client: utf8 collation_connection: utf8_general_ci Database Collation: latin1_swedish_ciSee Also
This page is licensed: GPLv2, originally from fill_help_tables.sql
Last updated
Was this helpful?
.png?alt=media&token=7e7f4c73-9972-4e67-9a1a-74dc18591022&width=260&dpr=4&quality=100&sign=760f8d93&sv=2)
.png?alt=media&token=ee5a45b3-d05b-4bb5-97d0-0f25c5eeb110&width=260&dpr=4&quality=100&sign=12bc3702&sv=2)