title: How can i use IFNULL in Where clause
body: <p>I want to use <code>IFNULL()</code> in such a way that I can select the record containing NULL or, if a value is present, then select the record matchinga particular value.</p>
  
  <p>My query is:</p>
  
  <pre><code>SELECT (@v:=2) AS Row, CL.LeaveTypeId, CL.NumberOfLeave
  FROM `CompanyLeave` CL
  WHERE(IFNULL(CL.EmploymentType,0)=3);
  </code></pre>
  
  <p>column <code>EmploymentType</code> can contain either an <code>Integer</code> or <code>NULL</code>.</p>
  
  <p>I want to select the record matching the specified value, or, if none matches, then the record containing <code>NULL</code>.</p>