SQL Server Stored Procedure Tutorial
By: Greg Robidoux | Updated: 2011-06-21 | Comments | Related: 1 | 2 | 3 | More > Stored Procedures
A stored procedure is nothing more than prepared SQL code that you save so you can reuse the code over and over again. So if you think about a query that you write over and over again, instead of having to write that query each time you would save it as a stored procedure and then just call the stored procedure to execute the SQL code that you saved as part of the stored procedure.
In addition to running the same SQL code over and over again you also have the ability to pass parameters to the stored procedure, so depending on what the need is the stored procedure can act accordingly based on the parameter values that were passed.
Check out this tutorial to learn the following topics:
- Creating stored procedures
- Input parameters
- Output parameters
- Error handling
- SET NOCOUNT ON
- Dropping stored procedures
- Altering stored procedures
Last Updated: 2011-06-21
About the author
View all my tips