title: Execute stored procedure with a nullable parameter from SQL server management studio
body: <p>I have a stored procedure, <strong>uspUser_GetUserDetails</strong>, with several parameters. It gets called something like this:</p>
  
  <pre><code>uspUser_GetUserDetails 'LastName','FirstName', 'UserId', 'dtDate', 'DistrictId'
  </code></pre>
  
  <p>How do I run the stored procedure if the <code>dtDate</code> parameter is null. I tried </p>
  
  <pre><code>uspUser_GetUserDetails 'LastName','FirstName','UserId','','DistrictId'
  </code></pre>
  
  <p>but it doesn't do anything. Will something like this work? </p>
  
  <pre><code>uspUser_GetUserDetails 'LastName','FirstName','UserId',null,'DistrictId'
  </code></pre>
  
  <p>This takes forever to execute the query without returning any result. Note that the question is not about how to create a SP with a nullable parameter. My SP works fine from C#, it shows sqlvalue {null} in the parameters. I just want to test it quickly from SQL server management studio and know how to pass null parameter to it in this situation.</p>