Strange behavior with "IN" clause works

I found this site: here

it is 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 save the string?
''handled how null?

thanks for your help

+3
source share
2 answers

Your suspicions were correct .

So your request is basically

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

What is rated as

WHERE true and unknown

What unknown

select * from dual where '' = '';

will give the same (drawback) results

+12
source

Yes, in Oracle the empty string is NULL.

+2
source

Source: https://habr.com/ru/post/1761135/


All Articles