View stored procedure/function definition in MySQL

前端 未结 8 746
鱼传尺愫
鱼传尺愫 2020-12-23 02:14

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 SH

8条回答
  •  半阙折子戏
    2020-12-23 02:50

    An alternative quick and hacky solution if you want to get an overview of all the produres there are, or run into the issue of only getting the procedure header shown by SHOW CREATE PROCEDURE:

    mysqldump --user= -p --no-data --routines 
    

    It will export the table descriptions as well, but no data. Works well for sniffing around unknown or forgotten schemas... ;)

提交回复
热议问题