jassin-du
可以用 命令"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\';

分类:

技术点:

相关文章:

  • 2021-12-25
  • 2021-12-02
  • 2021-07-12
  • 2022-12-23
  • 2021-07-10
  • 2021-10-19
  • 2021-12-23
  • 2021-10-19
猜你喜欢
  • 2021-10-19
  • 2021-08-03
  • 2022-02-07
  • 2022-01-14
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案