title: SQL Multiple Filter - Optimal Way
body: <p><strong>How do you implement this simple scenario with the least possible cost (SQL) ?</strong></p>
  
  <p>(<em>implement a stored procedure supporting all combinations of the filters applied.</em>)</p>
  
  <pre><code>Table
  
      name | dateOfbirth | phone | email
       N1  | 01-01-1992  | P1    | E1
       N2  | 12-08-1976  | P2    | E2
       N3  | 09-11-1989  | P3    | E3
       N4  | 04-06-1991  | P4    | E4
  
      Filter 
      [x] Name
      [x] dateOfbirth 
      [x] phone
      [x] email
  </code></pre>
  
  <p>After seeing SQL queries and filters implemented  for many years and in many ways.</p>
  
  <p>I think it's high time for me to refresh.</p>
  
  <h2>References</h2>
  
  <ol>
  <li><p><a href="http://bit.ly/RYHzaF" rel="noreferrer">http://bit.ly/RYHzaF</a></p></li>
  <li><p><a href="http://bit.ly/QyX103" rel="noreferrer">http://bit.ly/QyX103</a></p></li>
  </ol>
  
  <blockquote>
    <p>Mark / Correct this question if found as duplicate</p>
  </blockquote>