Friday, April 27, 2012

Specify output parameters in stored procedures and set them up so that you do not have to specific inbound values.

ALTER procedure [dbo].[Whatever]
   @foo int,
   @bar int,
   @baz datetime = null OUTPUT,
   @qux datetime = null OUTPUT
as

 
 

Bonus: Today I learned that a stored procedure may hand back output parameters and even another dataset along side a dataset procured with a select statement!

No comments:

Post a Comment