Chapter 8. Implementing Business Logic: Programming Stored Procedures

A stored procedure is a database object that comprises one or more Transact-SQL statements. The main difference between a stored procedure and a set of statements is that a stored procedure can be reused just by calling its name. Therefore, if you want to rerun the code, you don't have to execute the whole set of statements that compose the stored procedure one by one.

As a database developer, you will spend most of your time coding, fixing, and optimizing stored procedures because they can be used for thousands of purposes. Not only can they be used to encapsulate business logic for your applications, they also can be used for administrative purposes inside SQL Server.

This chapter teaches you the following:

  • The benefits of using stored procedures

  • The types of stored procedures in SQL Server

  • The types of stored procedure parameters

  • How to create, alter, and execute stored procedures

  • How to handle errors in stored procedures

  • Security considerations when working with stored procedures

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.65.247