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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Why do Oracle treat NULL like this?

Re: Why do Oracle treat NULL like this?

From: John Gasch <jgasch_at_erols.com>
Date: Fri, 31 Mar 2000 10:51:42 -0500
Message-ID: <38E4C98E.4FC9BF7D@erols.com>


You've hit on a historically contraversial topic. I suggest that you read "NOT is not Not" in C.J.Date's book "Relational Database: Selected Writings, 1985-1989. It is one of a series of papers on three-valued logic in Date's "Relational Database" books. In these papers, Date argues that SQL does not handle NULL logically, because it represents different logical states depending on the context.

I thought I knew SQL - until I was enlightened by these books. Highly recommended!!! They ought to be required reading for database designers and implementers.

John Gasch

Michael wrote:
>
> Hi,
>
> select 'a' || NULL || 'b'
> from dual
> gives 'ab'
>
> but
>
> select 1 + NULL
> from dual
> gives NULL
>
> Why in the first example, NULL is considered as empty string, while in the
> second example NULL is considered as undefined? That does not look
> consistent. What is the rationale behind it?
>
> Thanks in advance.
> Michael
Received on Fri Mar 31 2000 - 09:51:42 CST

Original text of this message

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