May 3, 2006 at 3:22 pm
How to determine which input parameter in a Stored procedure is optional (means have a defaullt value, could be NULL) in SQL 2005
I can get other information FROM INFORMATION_SCHEMA.PARAMETERS
and there is a view sys.all_parameters which has field called has_default_value but seems to be incorrect.
Anyone with any other info ??
Amit Lohia
May 3, 2006 at 3:49 pm
Having a default value and being optional are different things entirely.......the view is correct.
I do not have an answer for where to find the optional designatore though, as I always just look at the proc itself....
May 3, 2006 at 3:53 pm
If I am not mistaken. To make a parameter optional you have to pass a default value or NULL.
for example
Create proc ABC
(
@Parameter1 INT = NULL
)
Amit Lohia
May 5, 2006 at 9:33 am
sp_helptext <procname>
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy