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

Home -> Community -> Usenet -> c.d.o.server -> Re: Why are empty VARCHAR2S always NULL?

Re: Why are empty VARCHAR2S always NULL?

From: Wolfram Roesler <wr_at_grp.de>
Date: Thu, 22 Aug 2002 09:05:34 +0200
Message-ID: <Xns92725D2B0E1ABwrgrpde@62.153.159.134>


"Niall Litchfield" <n-litchfield_at_audit-commission.gov.uk> wrote in news:3d63bbec$0$8513$ed9e5944_at_reading.news.pipex.net:

> I see that the rest of your comments follow from this. I don't see you
> answering my second question though. If not an empty string what
> representation would you use for NULL in a character field.

Sorry for not making myself clear. I'd use NULL for "unknown" but '' for "known but empty". It's fine that NULL is around - one could discuss if ternary logic is absolutely necessary or if NULL=NULL wouldn't be more logical, but I'm not going to go into that. I'd just like empty strings to behave like non-empty ones, and NULL to be something special. Perhaps I'm too much biased towards the C programming language, where you have strings ("like this"), empty strings (""), and NULL pointers (which all follow binary logic however, with all NULL pointers comparing equal and such).

> In the end this is a philosophical difference I think and not a bug as
> such. The product is working as intended and documented but not as you
> expect.

I see. Well, how about the other developers: Do you follow Oracle's philosophy that "'' IS NULL", or do you follow mine that '' and NULL should be different things?

Thanks for your time
W. Roesler Received on Thu Aug 22 2002 - 02:05:34 CDT

Original text of this message

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