September 2010
Intermediate to advanced
1704 pages
111h 8m
English
You can assign a default value to a parameter by specifying a value in the definition of the parameter, as shown in Listing 28.11.
Listing 28.11 Assigning a Default Value for a Parameter in a Stored Procedure

You can have SQL Server apply the default value for a parameter during execution by not specifying a value or by specifying the DEFAULT keyword in the position of the parameter, as shown in Listing 28.12.
Listing 28.12 Applying a Default Value for a Parameter When Executing a Stored Procedure

If ...