I had seen the features of it. But couldn't get the reason why to use
-
[This](http://stackoverflow.com/questions/459457/what-is-a-stored-procedure) link explains what it is and what benefit (if any) it has. – Asier Azkuenaga Feb 23 '17 at 06:11
2 Answers
We need to use the stored procedures by the following reasons.
1. Reusable Execution plan
Rather than the query, SP makes a cache of the Execution plan while saving it which can be reused
2. Sharing
Stored procedure can be shared among the different applications over the queries that used within the code.
3. Protection over Sql Injection
Sp provides security over injection attacks by using the checks rather than the query
4. One place change
It provides with a benefit to change in one place that reflect changes wherever it is used.
5. Executing permissions
SP has a feature where we can give the executing permission only to a user or role

- 93
- 1
- 4
-
The link provides [USES](http://stackoverflow.com/a/209040/7609073) – PRUTHVI RAJU Feb 23 '17 at 07:05
Stored procedure is a set of SQL statements with an assigned name that's stored in the database in compiled form so that it can be shared by a number of programs.We can easily use the stored procedure whenever needed

- 158
- 1
- 9