Database Reference
In-Depth Information
The COUNT function returns an integer, so this was a convenient way to demonstrate how to use the
RETURN statement.
Tip Input parameters can also be assigned default values.
Modifying Stored Procedures
You use the Alter Procedure procedure_name statement to modify an existing stored procedure.
Try It: Modifying Your Trivial Stored Procedure
1. Here you are modifying the sp_Select_All_PersonContact stored procedure
shown in Figure 6-1 by adding an Order by clause. (See Figure 6-5.)
Alter procedure sp_Select_All_PersonContact
As
select Contact.Title, Contact.FirstName, Contact.LastName
from Person.Contact
Order by Contact.LastName
 
Search WWH ::




Custom Search