To see all of the functions across all databases, use the SHOW FUNCTION STATUS command : Function Data Dictionary : Procedure Function SQL / MySQL


SQL / MySQL » Procedure Function » Function Data Dictionary »

 

To see all of the functions across all databases, use the SHOW FUNCTION STATUS command


 
mysql>
mysql> DELIMITER //
mysql>
mysql> CREATE FUNCTION myFunction (item_sum DECIMAL(10,2))
    -> RETURNS DECIMAL(10,1)
    -> BEGIN
    ->
    ->
    -> RETURN ROUND(item_sum,1);
    ->
    -> END
    -> //
Query OK, rows affected (0.02 sec)

mysql> DELIMITER ;
mysql>
mysql> select myFunction(123.12);
+--------------------+
| myFunction(123.12|
+--------------------+
|              123.1 |
+--------------------+
row in set (0.00 sec)

mysql>
mysql>
mysql> SHOW FUNCTION STATUSG
*************************** 1. row ***************************
           Db: test
         Name: delivery_day_shipping
         Type: FUNCTION
      Definer: root@localhost
     Modified: 2007-07-23 17:17:21
      Created: 2007-07-23 17:17:21
Security_type: DEFINER
      Comment:
*************************** 2. row ***************************
           Db: test
         Name: myFunction
         Type: FUNCTION
      Definer: root@localhost
     Modified: 2007-07-23 18:58:39
      Created: 2007-07-23 18:58:39
Security_type: DEFINER
      Comment:
rows in set (0.01 sec)

mysql>
mysql>
mysql> drop function myFunction;
Query OK, rows affected (0.00 sec)

mysql>
mysql>

        



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

SQL / MySQL

 Navioo Procedure Function
» Function Data Dictionary