Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Stored procedure
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Subroutine available to applications that access relational database management systems}} {{refimprove|date=June 2024}} A '''stored procedure''' (also termed '''prc''', '''proc''', '''storp''', '''sproc''', '''StoPro''', '''StoredProc''', '''StoreProc''', '''sp''', or '''SP''') is a [[subroutine]] available to applications that access a [[relational database management system]] (RDBMS). Such procedures are stored in the database [[data dictionary]]. Uses for stored procedures include [[data validation|data-validation]] (integrated into the database) or [[access control|access-control]] mechanisms. Furthermore, stored procedures can consolidate and centralize logic that was originally implemented in applications. To save time and memory, extensive or complex processing that requires execution of several [[SQL]] statements can be saved into stored procedures, and all applications call the procedures. One can use nested stored procedures by executing one stored procedure from within another. Stored procedures may return [[result set]]s, i.e., the results of a <code>SELECT</code> statement. Such result sets can be processed using [[Cursor (databases)|cursors]], by other stored procedures, by associating a result-set locator, or by applications. Stored procedures may also contain declared variables for processing data and cursors that allow it to loop through multiple rows in a table. Stored-procedure flow-control statements typically include <code>IF</code>, <code>WHILE</code>, <code>LOOP</code>, <code>REPEAT</code>, and <code>CASE</code> statements, and more. Stored procedures can receive variables, return results or modify variables and return them, depending on how and where the variable is declared.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)