Re: null? not null?
Date: 1996/09/08
Message-ID: <32331A28.6655_at_glo.be>#1/1
A NULL value can normally be interpreted as 'I do not know what it is'. So the following statements all give "no rows selected":
select 'x' from dual where 4 in (1, 2, 3, null);
select 'x' from dual where 4 not in (1, 2, 3, null);
But, there's one exception... When we talk about empty strings. Since an empty string and a null string has the same representation, Oracle does not know the difference.
So, following statement gives something:
select 'x' from dual where '' is null;
And something like
select 'x' from dual where '' || 'abc' = 'abc';
gives you a row.
In contrast,
So, for strings their is an exception, but a normal exception if you ask me.
The empty string would be very useless if it had the same comportement as a null.
Steph.
select 'x' from dual where '' + 3 = 3;
gives you no row, something we expected since Oracle converts the '' to null and
null + something is null, which gives FALSE (in fact NULL) when compared to 3.