查看 MySQL 中的存储过程/函数定义 [英] View stored procedure/function definition in MySQL

查看:32
本文介绍了查看 MySQL 中的存储过程/函数定义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

查看存储过程或函数定义的MySQL命令是什么,类似于Microsoft SQL Server中的sp_helptext?

What is the MySQL command to view the definition of a stored procedure or function, similar to sp_helptext in Microsoft SQL Server?

我知道 SHOW PROCEDURE STATUS 将显示可用程序的列表.我需要查看单个过程的定义.

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>

返回使用CREATE PROCEDURE 语句创建的先前定义的存储过程的文本.将 PROCEDURE 替换为 FUNCTION 以获取存储函数.

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.

这篇关于查看 MySQL 中的存储过程/函数定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆