Re: IS (NULL = 1) equal to NOT(NULL = 1)?

From: John Blackburn <jb2_at_qdot.qld.gov.au>
Date: 1996/08/30
Message-ID: <Pine.GSO.3.93.960830091725.10089A-100000_at_avalon>#1/1


References: <4vflmd$1fti_at_mule2.mindspring.com> <01bb9128$8956b120$b99163cc_at_Shawno.erudite.com> Distribution:

Shawn Odekirk (shawno_at_erudite.com) wrote:
: John Dennis <jtdennis_at_atl.mindspring.com> wrote in article
: <4vflmd$1fti_at_mule2.mindspring.com>...
: >
: > Of course not right? Oracle says it is!
 

: < --SNIP-- Because Internet Explorer told me I was quoting too much>
 

: > Now I've been doing this for a while. I know that 1 is not equal to
: > NULL. I thought this meant (1 = NULL) = FALSE which might be true.
: > However if it is true then certainly NOT(1 = NULL) would then be TRUE.
: > NOT of *any* expression is the opposite boolean value. But not here.
: >
: > Anyway, if anyone could point out my error here please do so. I
: > wouldn't even mind a little "... any rookie that knows anything know
: > should know that null, etc..." stuff. Hmmm, well maybe not.
: >
: > Virtually,
: >
: > John Dennis
: >
 

: 1 is not equal to NULL, but it's also NOT not equal to NULL. That's the
: problem.
: You can't perform equality operations against NULL because NULL by
: definition
: is not equal to anything. NULL is undefined.
: The only explanation that I can give for the NOT(1 = NULL) result is that
: Oracle
: is trying to tell you that you can't compare 1 to NULL in any way.
 

: Shawn

OK, so if I can't compare 1 to NULL in any way, why doesn't oracle stop me by saying something like:

ERROR:
ORA-01476: attempt to compare with a NULL value

This would make more sense than the current situation which IMHO is a paradox!

John.

--
John Blackburn                        jb2_at_qdot.qld.gov.au
Queensland Transport                  +61 7 32534634
Australia

#include <std_disclamers.h>
#include <nonstd_disclamers.h>
Received on Fri Aug 30 1996 - 00:00:00 CEST

Original text of this message