Can I have optional parameters to my stored procedures?
Nov 13 '09 at 10:10 AM
Anthony Osborn ♦♦
Apr 21 '10 at 05:38 PM
Kev Riley ♦♦
You haven't provided much detail , but this is how you can default parameter values (and therefore make them optional)
Create Procedure proc @Param1 integer = NULL as return
Nov 13 '09 at 10:27 AM
Apr 21 '10 at 09:12 PM
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
There's a new way to format code on the site - the red speech bubble logo will automatically format T-SQL for you. The original code box is still there for XML, etc. More details here.
Once you sign in you will be able to subscribe for any updates here
Answers and Comments
Need long-form SQL discussion? SQLserverCentral.com is the place.
asked: Nov 13 '09 at 10:10 AM
Seen: 1238 times
Last Updated: Apr 21 '10 at 05:38 PM
optional paramenters in a procedure
How to get the count of Input Parameters and their names in SP ?
Building a Dynamic Stored Procedure
SSRS 2005 Dataset stored procedure and multi-valued parameter
parameter in stored procedure
Issue with OUTPUT Parameter
Determine the values of a parameter
Nested Transactions in the stored proc
Different data sets in one query
How to pass paramters to a remote procedure