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

Home -> Community -> Usenet -> c.d.o.tools -> Help! How to insert an empty string without converting to null

Help! How to insert an empty string without converting to null

From: Igor Shmulevich <igors_at_csd.uwm.edu>
Date: Fri, 29 Sep 2000 17:44:24 -0700
Message-ID: <8r3d3o0pe6@enews3.newsguy.com>

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 Received on Fri Sep 29 2000 - 19:44:24 CDT

Original text of this message

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