title: Optional parameters in SQL UDF without DEFAULT keyword
body: <p>I am looking for a solution, how to create SQL UDF with optional params.</p>
  
  <p>Pseudocode for function where Param1 is necessary and Param2 may be filled (but not needed):</p>
  
  <pre><code>dbo.myFnc(Param1 int [, Param2 int])
  </code></pre>
  
  <p>Is there a way to create thislike function? For existing built-in sample watch the <a href="http://msdn.microsoft.com/en-us/library/ms189527.aspx" rel="nofollow">STR function</a></p>
  
  <pre><code>STR ( float_expression [ , length [ , decimal ] ] )
  </code></pre>