stored procedure to list stored procedures
Date: February 01, 2007 01:13PM
Hi, I am a newbie to stored procedures. I would like to created a stored procedure to list all current stored procedures available. Is there a way to call a mysql variable that knows what database I am currently using?
Where 'testspp' is replaced by the database that is currently being used.
DROP PROCEDURE IF EXISTS list_stored_routines
CREATE PROCEDURE list_stored_routines
READS SQL DATA
IF (show_body = 1) THEN
SELECT routine_name, routine_type, definer, routine_definition FROM information_schema.routines WHERE routine_schema LIKE 'testspp';
SELECT routine_name, routine_type, definer FROM information_schema.routines WHERE routine_schema LIKE 'testspp';
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.