List of Stored Procedures and Functions in MySQL Database



We can see the list of the stored procedure and stored functions in a particular 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 the procedure named ‘allrecords’, and function named ‘Hello’ which are stored in the database named ‘query’.

Updated on: 2020-06-22T05:22:34+05:30

237 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements