views:

99

answers:

2

i found this site: here

its very well described why it works and why not.

but my question is a little different.

select 'true' from dual where 'test' not in ('test2','');

why does this query not returing a row?
is '' handled like null?

thx for your help

+11  A: 

Your suspicions were correct.

So your query is basically

WHERE 'test' <> 'test2' and  'test' <> Null

Which evaluates as

WHERE true and unknown

Which is unknown

select * from dual where '' = '';

will give the same (lack of) results

Martin Smith
great, thx for your answer.oracle and null handling a chapter for...
Auro
+2  A: 

Yes, in Oracle an empty string is a NULL.

Mark Bannister