本节分享下,在mysql中查看sp、fun、trigger、view、event的方法。
1,查看sp和fun
复制代码 代码示例:
show procedure status;
show function status;
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 create procedure procedure_name
show create function function_name
2,查看trigger
复制代码 代码示例:
show triggers;
select * from information_schema. TRIGGERS
show triggers like 'test1';
show create triggers 触发器名称
3,查看view
复制代码 代码示例:
show table status where comment='view';
详细内容
Show create view/table 视图名称
4,查看event
复制代码 代码示例:
show events
show create event 事件名