title: How should I deal with null parameters in a PL/SQL stored procedure when I want to use them in comparisons?
body: <p>I have a stored procedure with a parameter <code>name</code> which I want to use in a <code>where</code> clause to match the value of a column i.e. something like</p>
  
  <pre><code>where col1 = name
  </code></pre>
  
  <p>Now of course this fails to match <code>null</code> to <code>null</code> because of the way <code>null</code> works.  Do I need to do</p>
  
  <pre><code>where ((name is null and col1 is null) or col1 = name)
  </code></pre>
  
  <p>in situations like this or is there a more concise way of doing it?</p>