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: NULLs

Re: NULLs

From: Andy Hassall <andy_at_andyh.co.uk>
Date: Wed, 21 Dec 2005 22:58:40 +0000
Message-ID: <58njq117dsk47j39kc5650pc18ucvgn0ep@4ax.com>


On 21 Dec 2005 14:35:18 -0800, yong321_at_yahoo.com wrote:

>There're some anomalies about null. If you insert both a NULL and a
>null string (i.e. '') into the table, a query WHERE column is NULL
>selects both of them.

 Because Oracle transforms '' into NULL, what is stored is two NULLs. Oracle's internal representation of '' and NULL are identical, and that representation is treated as NULL. It cannot store a zero-length string ''.

 The condition " where column = '' " never matches any rows in Oracle for the same reason.

-- 
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Received on Wed Dec 21 2005 - 16:58:40 CST

Original text of this message

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