Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: storing an empty string
Markus Innerebner wrote:
> Hello
> I see while I am trying to store an empty java string in an oracle
> database, it will be converted to null.
>
> Is there a way to store an empty string in oracle without beeing
> converted automaticly.
>
> The problem is, that every time a read such data I get a null instead
"".
> So I need every time to reconvert it again.
>
> thanks for your help
I believe that the short answer is no, in Oracle databases the empty string *is* null. This tends to provoke religious wars about whether it should be or not, but it is so thats just tough really. I don't see anyway of doing what you want without a conversion step (though you might wish to find a character that you are 110% convinced will not ever appear in valid data and store the empty string as that character if you column really is nullable).
Niall Litchfield
Oracle DBA
http://www.niall.litchfield.dial.pipex.com
Received on Wed Mar 30 2005 - 03:34:12 CST
![]() |
![]() |