x

Can I have optional parameters to my stored procedures?

Can I have optional parameters to my stored procedures?

more ▼

asked Nov 13, 2009 at 10:10 AM in Default

Anthony Osborn gravatar image

Anthony Osborn ♦♦
171 8 9 11

(comments are locked)
10|1200 characters needed characters left

1 answer: sort voted first

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 
more ▼

answered Nov 13, 2009 at 10:27 AM

dave ballantyne gravatar image

dave ballantyne
928 1 1 4

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

New code box

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.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x412
x74

asked: Nov 13, 2009 at 10:10 AM

Seen: 1628 times

Last Updated: Apr 21, 2010 at 05:38 PM