What is the MySQL command to view the definition of a stored procedure or function, similar to sp_helptext in Microsoft SQL Server?
sp_helptext
I know that SH
SH
Perfect, try it:
SELECT ROUTINE_DEFINITION FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_SCHEMA = 'yourdb' AND ROUTINE_TYPE = 'PROCEDURE' AND ROUTINE_NAME = "procedurename";