What are stored procedures? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

What are stored procedures?

20th Nov 2016, 1:27 AM
Raghunath S
Raghunath S - avatar
4 Answers
+ 6
In a DBMS, a 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. The use of stored procedure can be helpful in: 1- Providing a controlled access to data (end users can only enter or change data but can't write procedures) 2- Ensuring data integrity (data would be entered in consistent manner) 3- Improves productivity (the statements of stored procedure need to be written only once)
20th Nov 2016, 4:11 AM
Ebrahim Elsharawy
Ebrahim Elsharawy - avatar
+ 2
It is a 'piece' of code like a function that is write and saved in the database. It runs when is invoked
20th Nov 2016, 2:10 AM
Omar Cadima
+ 1
SP is a kind of batch script saved in DB. Imagine OS shell scripts. sometimes they could be a shortcut for long code or a unit of meaning-full job and also could be flexible with input parameters.
20th Nov 2016, 1:12 PM
iw.song
iw.song - avatar
0
A procedure (often called a stored procedure) is a subroutine like a subprogram in a regular computing language, stored in database. A procedure has a name, a parameter list, and SQLstatement(s). All most all relational database system supports stored procedure, MySQL 5 introduce stored procedure.
20th Nov 2016, 4:15 PM
Ananthoos Ananthu
Ananthoos Ananthu - avatar