What is the MySQL command to view the definition of a stored procedure or function, similar to sp_helptext
in Microsoft SQL Server?
I know that SHOW PROCEDURE STATUS
will display the list of the procedures available. I need to see a single procedure's definition.
SHOW CREATE PROCEDURE <name>
Returns the text of a previously defined stored procedure that was created using the CREATE PROCEDURE
statement. Swap PROCEDURE
for FUNCTION
for a stored function.