View, modify, delete, and create a mysql Stored Procedure

Source: Internet
Author: User

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;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.