Xref: alice comp.databases.oracle.server:28660
Path: alice!news-feed.fnsi.net!news.idt.net!newsfeed.ecrc.net!newsfeed.uk.ibm.net!ibm.net!newsgate.cistron.nl!het.net!pascal.a2000.nl!not-for-mail
From: "Arjan van Bentem" <avbentem@DONT-YOU-DAREdds.nl>
Newsgroups: comp.databases.oracle.server
Subject: Re: Char vs Varchar2 and NULL
Date: Wed, 9 Sep 1998 19:17:43 +0200
Organization: -
Lines: 21
Message-ID: <6t6d5a$gqd$1@newton.a2000.nl>
References: <35F58BC8.5076@mb.sympatico.ca> <1998090902372200.WAA05083@ladder01.news.aol.com>
X-Newsreader: Microsoft Outlook Express 4.72.3155.0
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3155.0

>I am told but have not checked, that
>IF NULL = NULL THEN
>will always evaluate to false

Indeed. When in doubt think of it as 'undefined' or 'X'. Here, the value of
unkown X would set the result:

    ( null and true ) = ( X and true ) = X = null
    ( null or false ) = ( X or false ) = X = null

But in the next two examples, it would not matter what value X has:

    ( null or true ) = ( X or true ) = true
    ( null and false ) = ( X and false ) = false

Well, when evaluating ( null = null ), you'd need to think of ( X = Y ).

Arjan.



