Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: NULL versus empty string
"Michael Gast" <mig-sm_at_web.de> wrote in message
news:3D981997.20600_at_web.de...
> Hi Tim,
>
> Tim schrieb:
> > I would guess that the logic is that if you don't want to allow null,
> > then you want an actual value and "" while not being null, is not really
> > a value conceptually. I mean, if "" was acceptable, why not just allow
> > null?
>
> NULL means: I have no value
> "" means: I have the value ""
The problem becomes acute, when you are importing from XML. There is a significant difference between an XML element being optional and a mandatory element containing #PCDATA which could be an empty string. In this case it really is very unfortunate that Oracle treats empty strings as NULL, because that way one can not accomplish a mapping between XML and the relational model in a simple way.
rob van lopik Received on Mon Sep 30 2002 - 07:08:54 CDT
![]() |
![]() |