mysql 存储过程查询语句

可以用 命令"show PROCEDURE status"查看所有的存储过程或检索系统表"mysql.proc"来查询已有的存储过程。
例如:
用show PROCEDURE status命令查看:
-- 查看所有的存储过程
show PROCEDURE status;
-- 查看特定数据库存储过程
show PROCEDURE status where db='test';

-- 用指定的登录名查看该用户创建的存储过程
show PROCEDURE status where definer='root@localhost'; -- @localhost为用户登录位置(本地登录)

-- 查看指定时间段创建存储过程
show PROCEDURE status where created between '2017-02-17 00:00:00'
and '2017-02-17 23:59:59';

用系统表mysql.proc来查看:
-- 查看所有的存储过程信息
select * from mysql.proc;

-- 查看特定数据库里的存储过程
select * from mysql.proc where db='test';

-- 查看某个用户定义的存储过程
select * from mysql.proc where definer='root@localhost';

-- 查看某时间段创建的存储过程
select * from mysql.proc where created between '2017-02-17 00:00:00'
and '2017-02-17 23:59:59';

转载于:https://www.cnblogs.com/jassin-du/p/8060400.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值