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

Home -> Community -> Mailing Lists -> Oracle-L -> Empty String is interpreted as NULL

Empty String is interpreted as NULL

From: Reuben D. Budiardja <techlist_at_voyager.phys.utk.edu>
Date: Fri, 18 Jul 2003 15:22:11 -0400
Message-Id: <25956.338502@fatcity.com>


Hello all,
Suppose I have this table

SQL> DESC FRUIT

 Name                                      Null?    Type
 ----------------------------------------- -------- 
 ORANGE                                    NOT NULL VARCHAR2(10)
 APPLE                                     NOT NULL VARCHAR2(10)

If I do this insert:

SQL> /
INSERT INTO FRUIT VALUES ('hello', '')
*
ERROR at line 1:
ORA-01400: cannot insert NULL into ("LIGHTCONE"."FRUIT"."APPLE")

I got an error cannot insert NULL. But, what if I meant is to insert empty string '' ? Certainly empty string is NOT equal to NULL values.

So how do I get around this?

Thanks in advance for any help. Received on Fri Jul 18 2003 - 14:22:11 CDT

Original text of this message

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