This chapter is split into two major topics. First, it covers stored procedures and then user-defined functions. This means the five objectives are split up into ten smaller pieces, half for stored procedures and half for user-defined functions. It's a good logical break, but it doesn't necessarily get along with how the objectives are laid out. This chapter isn't ordered the way the objectives are written, but by how you need to learn the material.
Managing Data Manipulation Using Stored Procedures
What Is a Stored Procedure?
Creating and Managing Stored Procedures
Stored Procedure Groups
Calling Stored Procedures; Passing and Returning Parameters To and From Stored Procedures
Stored Procedure Scoping
Stored Procedures and Temporary Tables
Dropping Stored Procedures
Altering a Stored Procedure
Stored Procedure Text
Nested Stored Procedures
Enforcing Procedural Business Logic with Stored Procedures
Filtering Data Using Stored Procedures
Implementing Error Handling in Stored Procedures
Managing Data Manipulation with User-Defined Functions
Types of User-Defined Functions
Restrictions on User-Defined Functions
Creating User-Defined Functions
Dropping and Altering User-Defined Functions
Determinism and Functions
When to Use Functions or Stored Procedures
Passing and Returning Parameters To and From User-Defined Functions
Enforcing Procedural Business Logic Using User-Defined Functions
Filtering Data with User-Defined Functions
Implementing Error Handling in User-Defined Functions
Apply Your Knowledge
Exercises
Review Questions
Exam Questions
Answers to Review Questions
Answers to Exam Questions