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

Home -> Community -> Usenet -> c.d.o.misc -> Re: VARCHAR2: NULL value vs. empty string - Proof Oracle Supports Zero Length Strings

Re: VARCHAR2: NULL value vs. empty string - Proof Oracle Supports Zero Length Strings

From: Galen Boyer <galenboyer_at_hotpop.com>
Date: 15 Dec 2003 14:56:12 -0600
Message-ID: <uzndteraj.fsf@standardandpoors.com>


On Sun, 14 Dec 2003, damorgan_at_x.washington.edu wrote:

> In the ANSI standard NULL is defined as the lack of a value
> ... not as a zero length string and this is not subject to
> debate. It is the definition.

    ORA> create table tstnull (fld varchar2(10));

    Table created.

    ORA> insert into tstnull values (null);

    1 row created.

    ORA> insert into tstnull values ('');

    1 row created.

    ORA> select count(*) from tstnull where fld is null;

      COUNT(*)


             2

    ORA> select count(*) from tstnull where fld = '';

      COUNT(*)


             0

If your posted phrase is the definition, it looks like Oracle isn't within compliance.

-- 
Galen Boyer
Received on Mon Dec 15 2003 - 14:56:12 CST

Original text of this message

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