Chapter 10. Programmable Objects
This chapter provides a brief overview of programmable objects to familiarize you with the capabilities of Microsoft SQL Server in this area and with the concepts involved. The chapter covers variables; batches; flow elements; cursors; temporary tables; routines such as user-defined functions, stored procedures, and triggers; and dynamic SQL. The purpose of this chapter is to provide a high-level overview, not to delve into technical details. Try to focus on the logical aspects and capabilities of programmable objects rather than trying to understand all code elements and their technicalities.
Variables allow you to temporarily store data values for later use in the same batch in which they were declared. ...