Javatpoint Logo
Javatpoint Logo

MySQL Procedure

Creating a procedure

In MySQL, a procedure can also be created. A procedure can return one or more than one value through parameters or may not return at all. The procedure can be used in SQL queries.



procedure_name: name of the procedure.

Parameter: number of parameters. It can be one or more than one.

declaration_section: all variables are declared.

executable_section: code for the function is written here.

Example 1

Table - 1

MySQL Procedure

Creating procedure:

MySQL Procedure

Calling procedure:

MySQL Procedure
MySQL Procedure

Drop a procedure

In MySQL, a procedure can also be dropped. When a procedure id dropped, it is removed from the database.



procedure_name: name of the procedure to be dropped.

Example 1:

MySQL Procedure
Next TopicMySQL Trigger

Youtube For Videos Join Our Youtube Channel: Join Now

Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA