Click here to Skip to main content
15,888,351 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi, I got a stored procedure written as below:

SQL
DECLARE
    @p_SiteId AS TINYINT = 0
   ,@p_FocusedFactoryList AS VARCHAR(MAX) = '';
   ,@p_ItemNumberInternal AS VARCHAR(50);
--AS
BEGIN


From the above declaration, I got @p_SiteId which is init to 0. If from my codes, the parameter value is 3 for example, would the 0 be replaced by 3 inside the entire stored procedure?
Posted

1 solution

Hello ,
In you SP , you have set default value of @p_SiteId =0 means , if you will not pass the parameter value then it will be set to 0 by default . Moreover when you execute the SP then no need to pass that variable .

For reference check this :
Specifying a Parameter Default Value

thanks
 
Share this answer
 
Comments
Jamie888 1-Jul-15 2:04am    
Yes sir, thanks for your help. It clear my question now. Thank you.
Animesh Datta 1-Jul-15 2:14am    
glad to help you..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900