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 21, 2018, 8:36 PM EST
Thanx for sharing this article
Ravi KandelPosted Mar 8, 2017, 3:59 AM EST
Awesome Thanks for sharing
SubashPosted Aug 1, 2016, 8:37 PM EDT
Nice one
Bhushan SinghPosted May 3, 2016, 7:23 PM EDT
thanks all guys
Bhuvanesh MohankumarPosted May 3, 2016, 7:44 AM EDT
Good one...
Bhuvanesh MohankumarPosted May 3, 2016, 7:44 AM EDT
Good one...
Vignesh ManiTOP 100Posted Apr 14, 2016, 4:22 AM EDT
Nice
Rahul Kumar SaxenaTOP 100Posted Apr 12, 2016, 10:06 AM EDT
Good Show
Mohammed IbrahimPosted Apr 12, 2016, 10:03 AM EDT
nice
Debasis SahaTOP 100Posted Apr 12, 2016, 9:24 AM EDT
Good One..
Kuppurasu NagarajTOP 100Posted Apr 12, 2016, 8:23 AM EDT
Nice Sharing..
Pankaj Kumar ChoudharyTOP 100Posted Apr 12, 2016, 7:30 AM EDT
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.........