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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: empty string = null?

RE: empty string = null?

From: MacGregor, Ian A. <ian_at_SLAC.Stanford.EDU>
Date: Fri, 12 Apr 2002 12:38:54 -0800
Message-ID: <F001.0044393B.20020412123854@fatcity.com>


The promise/threat to treat empty strings differently from nulls has been in the documentaion since at least Oracle 7.3.  

Ian MacGregor
Stanford Linear Accelerator Center
ian_at_slac.stanford.edu <mailto:ian_at_slac.stanford.edu>

-----Original Message-----
Sent: Thursday, April 11, 2002 6:33 PM
To: Multiple recipients of list ORACLE-L

I feel I had the same dream. Anyway this from Oracle 9i doc: Nulls

"If a column in a row has no value, then the column is said to be null, or to contain a null. Nulls can appear in columns of any datatype that are not restricted by NOT NULL or PRIMARY KEY integrity constraints. Use a null when the actual value is not known or when a value would not be meaningful.

Do not use null to represent a value of zero, because they are not equivalent. (Oracle currently treats a character value with a length of zero as null. However, this may not continue to be true in future releases, and Oracle recommends that you do not treat empty strings the same as nulls.) Any arithmetic expression containing a null always evaluates to null. For example, null added to 10 is null. In fact, all operators (except concatenation) return null when given a null operand."

Regards,

Waleed

-----Original Message-----
Sent: Thursday, April 11, 2002 8:44 PM
To: Multiple recipients of list ORACLE-L

Oracle has always treated empty strings (e.g.: '') as nulls. As I sit here and think about this, I can convince myself that I read somewhere that Oracle9i provided an option to treat empty strings not as nulls, but truly as empty strings. Is this the case, or is my mind manufacturing memories?

Jonathan Gennick --- Brighten the corner where you are mailto:jonathan_at_gennick.com <mailto:jonathan_at_gennick.com> http://Gennick.com <http://Gennick.com> * http://MichiganWaterfalls.com <http://MichiganWaterfalls.com> * http://ValleySpur.com <http://ValleySpur.com>

--
Please see the official ORACLE-L FAQ: http://www.orafaq.com <http://www.orafaq.com> 
--
Author: Jonathan Gennick
  INET: listmail_at_gennick.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L

(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: MacGregor, Ian A. INET: ian_at_SLAC.Stanford.EDU Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).
Received on Fri Apr 12 2002 - 15:38:54 CDT

Original text of this message

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