title: MySQL: selecting rows where a column is null
body: <p>I'm having a problem where when I try to select the rows that have a NULL for a certain column, it returns an empty set. However, when I look at the table in phpMyAdmin, it says null for most of the rows.</p>
  
  <p>My query looks something like this:</p>
  
  <pre><code>SELECT pid FROM planets WHERE userid = NULL
  </code></pre>
  
  <p>Empty set every time.</p>
  
  <p>A lot of places said to make sure it's not stored as "NULL" or "null" instead of an actual value, and one said to try looking for just a space (<code>userid = ' '</code>) but none of these have worked. There was a suggestion to not use MyISAM and use innoDB because MyISAM has trouble storing null. I switched the table to innoDB but now I feel like the problem may be that it still isn't actually null because of the way it might convert it. I'd like to do this without having to recreate the table as innoDB or anything else, but if I have to, I can certainly try that.</p>