mysql 查询数据库中的存储过程与函数的语句

很文博客hinven.com 数据库评论492字数 598阅读模式
广告也精彩

mysql 查询数据库中的存储过程函数的语句,需要的朋友可以参考下。

方法一:文章源自很文博客https://www.hinven.com很文博客-https://www.hinven.com/17865.html

select `name` from mysql.proc where db = 'your_db_name' and `type` = 'PROCEDURE' //存储过程文章源自很文博客https://www.hinven.com很文博客-https://www.hinven.com/17865.html

select `name` from mysql.proc where db = 'your_db_name' and `type` = 'FUNCTION' //函数文章源自很文博客https://www.hinven.com很文博客-https://www.hinven.com/17865.html

方法二:文章源自很文博客https://www.hinven.com很文博客-https://www.hinven.com/17865.html

show procedure status; //存储过程文章源自很文博客https://www.hinven.com很文博客-https://www.hinven.com/17865.html

SHOW PROCEDURE STATUS WHERE db='servant_591up'文章源自很文博客https://www.hinven.com很文博客-https://www.hinven.com/17865.html

show function status; //函数文章源自很文博客https://www.hinven.com很文博客-https://www.hinven.com/17865.html

查看存储过程或函数的创建代码

show create procedure proc_name;

show create function func_name;

查看视图

SELECT * from information_schema.VIEWS //视图

SELECT * from information_schema.TABLES //表

查看触发器

方法一:

语法:SHOW TRIGGERS [FROM db_name] [LIKE expr]

实例:SHOW TRIGGERS\G //触发器

方法二:

对INFORMATION_SCHEMA数据库中的TRIGGERS表查询

mysql>SELECT * FROM triggers T WHERE trigger_name=”mytrigger” \G

工具:作品在线观看

女优:最新作品观看

中文:国语在线观看

weinxin
我的微信
扫一扫更精彩
大家的支持是我更新的动力!!!
 
广告也精彩
匿名

发表评论

匿名网友
:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:
确定

拖动滑块以完成验证