How to view, modify, delete, and create a stored procedure in the mysql tutorial
This article briefly introduces how to view, modify, delete, and create a mysql stored procedure. The following four examples are provided to demonstrate the operations on the stored procedure.
Stored Procedures in the database query Tutorial:
Method 1: (direct query)
Select 'specpacific _ name' from mysql. proc where db = 'your _ db_name 'and 'type' = 'Procedure'
Method 2: (view all stored procedures and content in the database)
Show procedure status;
Method 3: (view the list of stored procedures in the current database)
Select specific_name from mysql. proc;
Method 4: (view the specific content of a stored procedure)
Select body from mysql. proc where specific_name = 'your _ proc_name ';
View the code for creating a stored procedure or function:
Show create procedure your_proc_name;
Show create function your_func_name;
Delete stored procedure:
Drop procedure your_proc_name;