Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: NULL value EQUALS to EMPTY string?!
I believe Oracle has chosen to conform to this standard in the current (8.1.6) or next release. They've prewarned us (those that read 8.1.6's release notes) that they will be desupporting the null string being equivalent to NULL. Having grown up in the Oracle world, I have tons of code to scour and change as I coded with the old notion of null string in mind. So...you're right!
"Lou Degenaro" <degenaro_at_watson.ibm.com> wrote in message
news:38BE9546.126026B_at_watson.ibm.com...
> 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.
>
> Lou Degenaro
> degenaro_at_watson.ibm.com
>
> TurkBear wrote:
>
> > Furthermore,
> > Nothing is equal to NULL ( That is, no thing, not the quantity nothing)
not even
> > NULL
> >
> > the only operators for use with NULL are IS and NOT IS
> >
> > select x from y where z is null; or
> > select x from y where z is not null;
> > -------------
> > When inserting, a empty string '' is considered NULL, a blank string ' '
is a
> > blank string that can be selected or excluded with standard Sql
syntax...
> >
> > select x from y where z <> ' ';
> > select x from y where z = ' ';
> > select x from y where z > ' ';
> > ..etc.
> >
> > all work on blank strings, but not for empty (NULL) strings...
> >
> > Just more to think about,
> > John G
> >
> > "Michel Cadot" <micadot_at_netcourrier.com> wrote:
> >
> > >Your statements show it to you:
> > >empty string is NOT equal to null,
> > >empty string IS null.
> >
> > -----------== Posted via Newsfeeds.Com, Uncensored Usenet News
==----------
> > http://www.newsfeeds.com The Largest Usenet Servers in the
World!
> > ------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers
==-----
>
Received on Thu Mar 02 2000 - 00:00:00 CST
![]() |
![]() |