title: mySQL select query does not return results when using a WHERE clause against a NULL column.
body: <p>I have a single column in a table which looks like this:</p>
  
  <p><a href="https://i.stack.imgur.com/9j4uU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9j4uU.png" alt="enter image description here"></a></p>
  
  <p>(field3 is NULL. I use QTODBC7.0 to perform SQL queries, and this application makes NULL fields appear blank in the query results, rather than displaying the text 'NULL')</p>
  
  <p>I have a simple SQL query as follows:</p>
  
  <pre><code>select * from table where field3 &lt;&gt; 'randomstring'
  </code></pre>
  
  <p>I expect the query to return ALL fields where field3 does not equal the value of 'randomstring'.</p>
  
  <p>The column, 'field3' does not equal the value of 'randomstring' therefore, it should be returned in the query. </p>
  
  <p><strong>A strange thing happens:</strong></p>
  
  <p>The above query returns nothing!</p>
  
  <p><a href="https://i.stack.imgur.com/qj8Ko.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qj8Ko.png" alt="enter image description here"></a></p>
  
  <p>field3 equals NULL therefore, it does not equal 'randomstring' therefore, the row should be returned in my query, but it is not. </p>
  
  <p>I did some testing, and discovered, this is caused when field3 is NULL but not If field3 equals a blank string (not NULL). </p>
  
  <p>How can I make the select statement work when there could be NULL values in field3?</p>