A stored procedure is a set of Transact-SQL (T-SQL) statements that is compiled and stored as a single database object for later repetitive use. It is the equivalent of a subroutine and a function in other programming languages. Upon completion of this chapter, you will be able to do the following:
Create a stored procedure
Explain the elements of a stored procedure
List ways to return information from a stored procedure
Pass input parameters to a stored procedure
Receive output parameters from a stored procedure
Receive a return value from a stored procedure
Explain where stored procedures are stored on SQL Server
Explain the compilation and reuse of stored procedures