Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Help! How to insert an empty string without converting to null
On Fri, 29 Sep 2000 17:44:24 -0700, "Igor Shmulevich" <igors_at_csd.uwm.edu> wrote:
>I am using JDBC to insert data into Oracle and MS SQL 7 databases. One of
>the major differences is that when I pass an empty string (e.g., String str
>= "") to MS SQL it does exactly what is expected - inserts a blank string
>into the database. Oracle, however, inserts a null value instead. So, when
>the data is retrieved, one can see str = null, rather then str = "".
>
>I hope this is just the default behavior for Oracle and it can be changed.
>The question is how?
>
>Thanks in advance,
>
>Igor
>
Oracle doesn't differentiate between empty strings and NULL.
So yes this is the default behavior
and NO it can not be changed.
You can either
a) submit an enhancement request by means of an ITAR b) learn to live with it c) stick to sqlserver
Regards,
Sybrand Bakker, Oracle DBA Received on Sat Sep 30 2000 - 01:25:27 CDT