We can view the list of stored procedures and stored functions in a specific database by using the following query on INFORMATION_SCHEMA.ROUTINES as follows:
mysql> SELECT ROUTINE_TYPE, ROUTINE_NAME FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_SCHEMA = 'query'; +--------------+--------------+ | ROUTINE_TYPE | ROUTINE_NAME | +--------------+--------------+ | PROCEDURE | allrecords | | FUNCTION | Hello | +--------------+--------------+ 2 rows in set (0.04 sec)
The above query returns a procedure named 'allrecords' and a function named 'Hello' stored in a database named 'query'.
The above is the detailed content of How can we view the list of stored procedures and stored functions in a specific MySQL database?. For more information, please follow other related articles on the PHP Chinese website!