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: '' = null ?

Re: '' = null ?

From: Thomas J. Kyte <tkyte_at_us.oracle.com>
Date: 2000/06/10
Message-ID: <8hu91b$9bv$1@nnrp1.deja.com>#1/1

In article <8htuuu$1epc$2_at_adenine.netfront.net>,   Norris <jcheong_at_cooper.com.hk> wrote:
> Is it true in Oracle that '' is equal to null value?
>
> For example, inserting '' value into a not null column would return
 error?
>
> --
> http://www.cooper.com.hk
>

correct
ops$tkyte_at_8i> create table t1 ( x varchar2(1) not null );

Table created.

ops$tkyte_at_8i>
ops$tkyte_at_8i> insert into t1 values ( null ); insert into t1 values ( null )

            *
ERROR at line 1:
ORA-01400: cannot insert NULL into ("OPS$TKYTE"."T1"."X")

ops$tkyte_at_8i> insert into t1 values ( '' ); insert into t1 values ( '' )

            *
ERROR at line 1:
ORA-01400: cannot insert NULL into ("OPS$TKYTE"."T1"."X")

--
Thomas Kyte (tkyte_at_us.oracle.com) Oracle Service Industries
Howtos and such: http://osi.oracle.com/~tkyte/index.html
Oracle Magazine: http://www.oracle.com/oramag
Opinions are mine and do not necessarily reflect those of Oracle Corp


Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Sat Jun 10 2000 - 00:00:00 CDT

Original text of this message

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