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

Home -> Community -> Usenet -> comp.databases.theory -> Re: Nullology of empty strings

Re: Nullology of empty strings

From: David Cressey <info_at_dcressey.com>
Date: Wed, 08 Jan 2003 14:59:12 GMT
Message-ID: <41XS9.17$Ep2.2554@petpeeve.ziplink.net>


I believe that the nullology of empty strings in Oracle is a side effect of the internal format for null fields, and for Varchars. In Oracle, any field whose first byte is zero is a null field. Also, a varchar of length zero begins with a zero byte. Oops.

As TimX already pointed out this is not guaranteed for future versions of Oracle.

Just be glad they didn't do the same thing with the number zero.

FWIW, Oracle bought another database from DEC (Digital) in 1994. That database engine, now called Oracle Rdb, gives the answer FALSE for "is null (empty)". Oracle Rdb uses a bit vector to indicate missing data, and doesn't use those bits to represent anything else. Hence there are no homonyms for null.

--
Regards,
    David Cressey
    www.dcressey.com
Received on Wed Jan 08 2003 - 08:59:12 CST

Original text of this message

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