Querying stored procedures in a database
Method One:
Select ' Name ' from Mysql.proc where db = ' your_db_name ' and ' type ' = ' PROCEDURE '
Method Two:
Show procedure status;
To view the creation code for a stored procedure or function
Show CREATE PROCEDURE Proc_name;
Show Create function Func_name;
Querying stored procedures and functions in a database
Method One:
Select ' Name ' from Mysql.proc where db = ' your_db_name ' and ' type ' = ' PROCEDURE '//stored procedure
Select ' Name ' from Mysql.proc where db = ' your_db_name ' and ' type ' = ' function '//functions
Method Two:
Show procedure status; Stored Procedures
Show function status; Function
To view the creation code for a stored procedure or function
Show CREATE PROCEDURE Proc_name;
Show Create function Func_name;
View View
SELECT * from INFORMATION_SCHEMA. Views//View
SELECT * from INFORMATION_SCHEMA. TABLES//Table
View triggers
Method One:
Syntax: SHOW TRIGGERS [from db_name] [like expr]
Example: SHOW triggers\g//Trigger
Method Two:
Querying the Triggers table in the INFORMATION_SCHEMA database
Mysql>select * FROM triggers T WHERE trigger_name= "Mytrigger" \g
MySQL stored procedures