Why is this query returning 0 rows?
select t.f1, t.f2 from (select null f1, \'a\' f2 from dual) t where t.f1<>t.f2;
This is a distill
SQL NULL does not work the way you would like it to work: http://en.wikipedia.org/wiki/Sql_null
In short, NULL = NULL is not true. NULL <> NULL is not true. NULL <> 1 is not true. And so forth.
NULL = NULL
NULL <> NULL
NULL <> 1