Introduction
In MySQL, a stored procedure is a methodology to encapsulate repetitive tasks.A stored procedure that calls itself is known as a Recursive stored procedure. The database can grant suitable permissions to applications that access stored procedures in the database without giving any permission on the basic database tables. A stored procedure can be also invoked by triggers.
Advantages of Stored Procedure:
- Once created stored procedures are compiled and they can be stored in the database.
- It is secure to use stored procedures.
- Stored procedures are reusable and transparent to any applications.
- stored procedures help an increasing the performance of the applications.
Steps to create a Stored Procedure:
I have an existing table with table name : “Tech”, as seen in below image.
Now I am creating a Stored Procedure using SELECT statement with name : “ tech_proc”.
Query: call tech_proc(5);
Example:
Example: Follow the below image with Insert Statement in Stored Procedure named “tech_procedure”.

Read more articles on MySQL:

Vipin MittalPosted Jan 22, 2018, 1:36 AM
Thanx for sharing this article
Ravi KandelPosted Mar 8, 2017, 8:59 AM
Awesome Thanks for sharing
SubashPosted Aug 2, 2016, 12:37 AM
Nice one
Bhushan SinghPosted May 3, 2016, 11:23 PM
thanks all guys
Bhuvanesh MohankumarPosted May 3, 2016, 11:44 AM
Good one...
Bhuvanesh MohankumarPosted May 3, 2016, 11:44 AM
Good one...
Vignesh ManiPosted Apr 14, 2016, 8:22 AM
Nice
Rahul Kumar SaxenaPosted Apr 12, 2016, 2:06 PM
Good Show
Mohammed IbrahimPosted Apr 12, 2016, 2:03 PM
nice
Debasis SahaPosted Apr 12, 2016, 1:24 PM
Good One..
Kuppurasu NagarajPosted Apr 12, 2016, 12:23 PM
Nice Sharing..
Pankaj Kumar ChoudharyPosted Apr 12, 2016, 11:30 AM
Nice Article Bhushan Sir.... I also have a confusion about the use of delimiter into stored procedure.... In other sql server like MS SQL Server and oracle we don't need of any type of delimiter but MySql stored procedure required delimiter can you explain what is use of this delimiter.........