MySQL Forums
Forum List  »  Stored Procedures

Re: Where can I see list of SPs also where have my comments gone?
Posted by: Andrew Gilfrin
Date: October 24, 2005 01:47AM

David

There are a couple of ways to get information about your procedures. First is the SHOW command which can be used in the following two ways with regard to procedures.

show create procedure testProc; (which shows the content of the procedure)

and

show procedure status; (which shows the status of the procedure which includes the comments).

If you want a more SQL approach you can query the Information Schema ROUTINES table like so.

mysql> select routine_name, routine_type,routine_schema from information_schema.routines;
+----------------+--------------+----------------+
| routine_name | routine_type | routine_schema |
+----------------+--------------+----------------+
| helloworld | FUNCTION | mysql |
| hello_employee | PROCEDURE | pers |
| load_temp | PROCEDURE | pers |
| login | FUNCTION | pers |
| testParam | PROCEDURE | pers |
| testPre | PROCEDURE | pers |
| testProc | PROCEDURE | pers |
+----------------+--------------+----------------+
7 rows in set (0.00 sec)

The ROUTINES table has many more columns which you can access using standard SQL statements.

For a little more info check out this page http://mysql.gilfster.com/page.php?parent_id=1.1&page_id=1.1.8 or the MySQL documentation.

Andrew Gilfrin
------------------
http://gilfster.blogspot.com
My MySQL related Blog

http://www.mysqldevelopment.com
MySQL Stored Procedure,Trigger, View.... (Just about most things these days) Information

Options: ReplyQuote




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.