Querying stored procedures and functions in the database
method one:
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' //函数
Method Two:
show procedure status; //Stored procedure
show function status; //function
View the creation code of a stored procedure or function
show create procedure proc_name;
show create function func_name;
View view
SELECT * from information_schema.VIEWS //Views
SELECT * from information_schema.TABLES //表
View triggers
method one:
语法:SHOW TRIGGERS [FROM db_name] [LIKE expr]
Example: SHOW TRIGGERS\G //Trigger
Method Two:
Query the TRIGGERS table in the INFORMATION_SCHEMA database
mysql>SELECT * FROM triggers T WHERE trigger_name=”mytrigger” \G