Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: NULL value EQUALS to EMPTY string?!
Lou Degenaro wrote:
>
> This seems wrong to me.
>
> If the field is initialized to NULL, then a search for IS NULL should return that
> row. If the field is initialized to the empty string, then the search for IS NULL
> should not return that row. The
> converse should also be true.
>
> In short, the empty string is different from null and should be treated as such. It
> does not seem at all intuitive that when a field is initialized to the empty string
> that a search for IS NULL will match it.
>
> It should be noted that db2 behaves as one might intuitively expect.
>
The official ISO/ANSI behavior is that they are different. However, Oracle has not conformed to that standard yet. As a result, an empty string is exactly the same as null and you must use the "IS NULL" or "IS NOT NULL" syntax. Received on Thu Mar 02 2000 - 00:00:00 CST