Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: NULL value EQUALS to EMPTY string?!

Re: NULL value EQUALS to EMPTY string?!

From: K Stahl <BlueSax_at_Unforgetable.com>
Date: 2000/03/02
Message-ID: <38BEA229.96B196A3@Unforgetable.com>#1/1

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US