title: How update Stored Procedure has Optional Parameter?
body: <p>How can I alter Update Stored Procedure so if developer want to set only <code>Size</code> then he/she does not requireed to pass <code>TimeStamp</code>. Moreover, then what will be execute code for this procedure?</p>
  
  <p><strong>Scenario:</strong></p>
  
  <p>Update <code>TimeStamp = getdate()</code> field whose <code>SizeID = 1</code> AND <code>Size =Large</code></p>
  
  <p>Note: This field Parameters and condition parameters must be dynamic and optionals like in where <code>TimeStamp</code> can also be supplied.</p>
  
  <p><strong>Update Stored Procedure:</strong> </p>
  
  <pre><code>ALTER PROCEDURE [dbo].[SP_Sizes_Update]
  
  @SizeID    int,
  @Size    varchar(50),
  @TimeStamp    datetime
  
  AS
  
  Update Sizes
  
  Set
      Size = @Size,
      TimeStamp = @TimeStamp
  Where
  
  SizeID = @SizeID
  </code></pre>