Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SHOW PROCEDURE CODE p1// does not work

Status
Not open for further replies.

LastWords

IS-IT--Management
Oct 15, 2001
93
GB
Trying to display a stored proc, and trying to do what the manual says:


Code:
SHOW PROCEDURE CODE p1;

This just comes back with the generic MySQL error. "You have an error in your MySQL syntax..."

Any ideas on how to display a stored proc?

Thanks

by Lastwords,

Maentwrog (n.Welsh): Celtic word for a computer spelling mistake.
 
From the very manual page you mention:

This statement is a MySQL extension that is available only for servers that have been built with debugging support.

I think you want more a statement like:
Code:
SHOW CREATE PROCEDURE p1;
or (better, as the above does not yield the body):
Code:
SELECT * FROM information_schema.ROUTINES
       WHERE UPPER(ROUTINE_SCHEMA)=UPPER(DATABASE()) AND SPECIFIC_NAME='p1';

where I compare the database names in upper case because of a Windows lower_case_tablenames bug.

+++ Despite being wrong in every important aspect, that is a very good analogy +++
Hex (in Darwin's Watch)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top