查询数据库中的存储过程和函数mysql
select `name` from mysql.proc where db = 'xx' and `type` = 'PROCEDURE' //存储过程sql
select * from mysql.proc where db = 'xx' and `type` = 'PROCEDURE' and name='xx'数据库
select `name` from mysql.proc where db = 'xx' and `type` = 'FUNCTION' //函数函数
show procedure status; //存储过程
show function status; //函数orm
查看存储过程或函数的建立代码io
show create procedure proc_name;
show create function func_name;
查看视图
SELECT * from information_schema.VIEWS //视图
SELECT * from information_schema.TABLES //表
查看触发器function
SHOW TRIGGERS [FROM db_name] [LIKE expr]
SELECT * FROM triggers T WHERE trigger_name=”mytrigger” \Gform