title: NOT IN is not working in MYSql. and Not Exists not giving proper result
body: <ol>
  <li><p>Trying to fetch record which does not have NULL or '' string using not in() function but not working. Please give any suggestion.</p>
  <pre><code> select * 
   from table 
   where colm1 = 'xyz' 
     and colm2 not in (NULL, '') 
     and id = 268594; 
  </code></pre>
  </li>
  <li><p>In second scenario, I have table A and B. Table B can have multiple records mapped to one table A record. I want to perform where clause on table B. If record is available then need to check value is not null or empty. How can I perform without performing select query 2 times:</p>
  </li>
  </ol>
  <p>Table A:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>a_id</th>
  <th>name</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>1</td>
  <td>&quot;xyz&quot;</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>Table B:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>B_id</th>
  <th>type</th>
  <th>value</th>
  <th>A_id</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>1</td>
  <td>&quot;x&quot;</td>
  <td>&quot;abd&quot;</td>
  <td>1</td>
  </tr>
  <tr>
  <td>2</td>
  <td>&quot;y&quot;</td>
  <td>&quot;cdv&quot;</td>
  <td>1</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>So want to select record of table A if record does not exists in Table B with type as &quot;x and A_id&quot; =1 and if exists then select table A record only if value is NULL or '' .</p>
  <p>I tried these queries but they are not working:</p>
  <pre><code>select * 
  from A 
  where not exists (select * 
                    from B 
                    where type = 'x' 
                      and value = null 
                       or value = '' 
                      and A_id = a_id); 
  </code></pre>