1.查询数据库中的存储过程和函数方法一:select `name` from mysql.proc where db = 'your_db_name' and `type` = 'PROCEDURE' //存储过程select `name` from mysql.proc where db = 'your_db_name' and `type` = 'FUNCTION' //函数方法二:show procedure status; //存储过程show function status; //函数查看存储过程或函数的创建代码show create procedure proc_name;show create function func_name;2.查看视图SELECT * from information_schema.VIEWS //视图SELECT * from information_schema.TABLES //表3.查看触发器方法一:语法:SHOW TRIGGERS [FROM db_name] [LIKE expr]实例:SHOW TRIGGERS\G //触发器方法二:对INFORMATION_SCHEMA数据库中的TRIGGERS表查询mysql>SELECT * FROM triggers T WHERE trigger_name=”mytrigger” \G
文章转载于:https://www.cnblogs.com/Raodi/p/12052531.html
原著是一个有趣的人,若有侵权,请通知删除
还没有人抢沙发呢~