Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 null value in stored procedure

Author  Topic 

shemayb
Posting Yak Master

159 Posts

Posted - 2008-09-25 : 23:10:51
I want my stored procedure to accept a null value when passing a parameter. How can i manage that in my script?

Thank you so much!

Funnyfrog

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-09-25 : 23:58:10
There's no trick to it, just pass a NULL or have the input parameter use NULL as the default.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-09-26 : 00:58:57
something like

CREATE PROC YourProcedures
@param1 int,
@Param2 varchar(100),...
@Nullvaluedparam varchar(100)=NULL
AS
...
Go to Top of Page
   

- Advertisement -