Re: IS (NULL = 1) equal to NOT(NULL = 1)?
Date: 1996/08/21
Message-ID: <4vg2q7$7u5_at_news2.cais.com>#1/1
OK You asked for it...
NULL is undefined. NULL might = 1 but can't be determined to be
NULL might not = 1 but also can't be determined to be.
So ( NULL = 1 ) = maybe, can't be sure
and NOT( NULL = 1 ) = maybe, can't be sure
since "maybe, can't be sure" = "maybe, can't be sure" then (NULL=1) = NOT(NULL=1)
hope it helps
Randy :)
John Dennis (jtdennis_at_atl.mindspring.com) wrote:
: Of course not right? Oracle says it is!
: I have the following *simple* code:
: set serveroutput on
: BEGIN
: DECLARE
: N NUMBER;
: BEGIN
: N := NULL;
: IF (N = 1)
: THEN
: dbms_output.put_line('TRUE');
: ELSE
: dbms_output.put_line('FALSE');
: END IF;
: /* Notice the expression has been "notted" */
: IF NOT(N = 1)
: THEN
: dbms_output.put_line('TRUE');
: ELSE
: dbms_output.put_line('FALSE');
: END IF;
: END;
: END;
: /
: FALSE
: FALSE
: 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
-- ..uu. ---------------------- .?$" '?i . I Randy DeWoolfson I .T^M ._at_" d9 . f ,.un. b, i I--------------------I " Z :#" M `8 U < .dP"``"# `M _at_" I randyd_at_cais.com I &H?` Xl _R $5. $ ?* _at_ 'P,#" I--------------------I ,d#^*L :RP'~$b f`$L:M Xf .f' dH` I ,\//. I & 'M ,P `E M "$ Mux~ n!` I |o o| I dk `h" ' j " y" *~ I====oOO==(_)==Ooo===IReceived on Wed Aug 21 1996 - 00:00:00 CEST