查詢數據庫中的存儲過程和函數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