title: In most SQL implementations, as opposed to standard programming languages, why doesn't x != null return true?
body: <p>Let's suppose that <code>x</code> is some variable that has any value other than <code>null</code>, say 4, as an example. What should the following expression return?</p>
  
  <pre><code>x != null
  </code></pre>
  
  <p>In just about every programming language I have ever worked with (C#, Javascript, PHP, Python), this expression, or an equivalent expression in that language, evaluates to <code>true</code>.</p>
  
  <p>SQL implementations, on the other hand, all seem to handle this quite differently. If one or both operands of the inequality operator are <code>NULL</code>, either <code>NULL</code> or <code>False</code> will be returned. This is basically the opposite of the behavior that most programming languages use, and it is <em>extremely</em> unintuitive to me.</p>
  
  <p>Why is the behavior in SQL like this? What is it about relationaly database logic that makes <code>null</code> behave so much differently than it does in general purpose programming?</p>