Welcome to Stored Procedures
A stored procedure is a precompiled group of Transact-SQL statements, and is saved to the database .Programmers and administrators can execute stored procedures either from the SQL Server Management Studio or from within an application as required. Once the stored procedure has been "stored", client applications can execute the stored procedure over and over again without sending it to the database server again and without compiling it again.
Stored procedures improve performance by reducing network traffic and CPU load.
Benefit | Explanation of benefit |
Modular programming | You can write a stored procedure once, then call it from multiple places in your application. |
Performance | Stored procedures provide faster code execution and reduce network traffic.
|
Security | Users can execute a stored procedure without needing to execute any of the statements directly. Therefore, a stored procedure can provide advanced database functionality for users who wouldn't normally have access to these tasks, but this functionality is made available in a tightly controlled way. |
You can find detailed stored procedures of popular database systems here:
a. Oracle : http://codingbasics.blogspot.com/2011/07/stored-procedures-in-ms-sql.html
b. MSSQL : http://codingbasics.blogspot.com/2011/07/stored-procedures-in-oracle.html
c. MySQL : http://codingbasics.blogspot.com/2011/07/stored-procedures-in-mysql.html