<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.2.2" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Why NULL never compares false to anything in SQL</title>
	<link>http://www.xaprb.com/blog/2006/05/18/why-null-never-compares-false-to-anything-in-sql/</link>
	<description>Stay curious!</description>
	<pubDate>Fri, 29 Aug 2008 19:44:29 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.2</generator>

	<item>
		<title>By: Xaprb</title>
		<link>http://www.xaprb.com/blog/2006/05/18/why-null-never-compares-false-to-anything-in-sql/#comment-4311</link>
		<author>Xaprb</author>
		<pubDate>Thu, 22 Feb 2007 15:13:17 +0000</pubDate>
		<guid>http://www.xaprb.com/blog/2006/05/18/why-null-never-compares-false-to-anything-in-sql/#comment-4311</guid>
		<description>&lt;p&gt;For a row where &lt;code&gt;increment&lt;/code&gt; is null, your query becomes:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;select * from employee where NULL = 500;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;NULL = 500&lt;/code&gt; is never true, so the row will not be returned.&lt;/p&gt;

&lt;p&gt;(It is never false either, as I explain above.  It is unknown.)&lt;/p&gt;

&lt;p&gt;If you want rows where the column is either 500 or NULL, try this:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;select * from employee where increment is null or increment = 500;&lt;/code&gt;&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>For a row where <code>increment</code> is null, your query becomes:</p>
<p><code>select * from employee where NULL = 500;</code></p>
<p><code>NULL = 500</code> is never true, so the row will not be returned.</p>
<p>(It is never false either, as I explain above.  It is unknown.)</p>
<p>If you want rows where the column is either 500 or NULL, try this:</p>
<p><code>select * from employee where increment is null or increment = 500;</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vinay</title>
		<link>http://www.xaprb.com/blog/2006/05/18/why-null-never-compares-false-to-anything-in-sql/#comment-4303</link>
		<author>vinay</author>
		<pubDate>Thu, 22 Feb 2007 14:15:52 +0000</pubDate>
		<guid>http://www.xaprb.com/blog/2006/05/18/why-null-never-compares-false-to-anything-in-sql/#comment-4303</guid>
		<description>&lt;p&gt;Hi,
In a query i am comparing the values of a column with some hard coded value in where clause.will the row in the table which has a null value in the field being compared be returned?
Eg:
Select * from Employee where increment = 500;
If in a row the increment is null than that row will come in output or not?&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>Hi,<br />
In a query i am comparing the values of a column with some hard coded value in where clause.will the row in the table which has a null value in the field being compared be returned?<br />
Eg:<br />
Select * from Employee where increment = 500;<br />
If in a row the increment is null than that row will come in output or not?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
