x
login about faq Site discussion (meta-askssc)

Can I have optional parameters to my stored procedures?

Can I have optional parameters to my stored procedures?

more ▼

asked Nov 13 '09 at 10:10 AM in Default

Anthony Osborn gravatar image

Anthony Osborn ♦♦
171 6 8 10

(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 '09 at 10:27 AM

dave ballantyne gravatar image

dave ballantyne
918 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.

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



Facebook logo Follow Ask SSC on Facebook
Find Ask SSC on Google+
linkedin logo Find us on LinkedIn

Topics:

x340
x66

asked: Nov 13 '09 at 10:10 AM

Seen: 1012 times

Last Updated: Apr 21 '10 at 05:38 PM

Copyright © 2002-2012 Simple Talk Publishing. All Rights Reserved. If you have any queries, please contact the site administrators.
Ask SQL Server Central is a community service provided by Red Gate.