SHOW CREATE FUNCTION

Syntax

SHOW CREATE FUNCTION func_name

Description

This statement is similar to SHOW CREATE PROCEDURE but forstored functions.

SHOW CREATE FUNCTION quotes identifiers according to the value of the sql_quote_show_create system variable. Prior to MariaDB 10.6.5, MariaDB 10.5.13 and MariaDB 10.4.22, the output of this statement was 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_ci

See Also

This page is licensed: GPLv2, originally from fill_help_tables.sql

Last updated

Was this helpful?