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

Home -> Community -> Usenet -> c.d.o.misc -> Re: NULL and zero length strings ?

Re: NULL and zero length strings ?

From: Martin Douglas <Martin.Douglas_at_Boeing.com>
Date: Tue, 20 Jul 1999 14:44:43 GMT
Message-ID: <37948B5B.2041A6ED@Boeing.com>


There is one exception that I know of to this trend... The package dbms_sys_sql differentiates between Null and zero-length strings in certain procedure and function calls.

Best Regards.

Kenneth C Stahl wrote:
>
> Paolo Bormida wrote:
>
> > Hi all !
> >
> > I have to admit I am somewhat new to Oracle and just discovered ORACLE 7.3.4
> > is treating a zero length string (like this '') as NULL.
> >
> > We have an application sending INSERT statements on a table with
> > not-nullable char/varchar columns; running it against ORACLE we have a few
> > problems..
> >
> > Any idea on how to solve this problem...
> >
> > Any session option to set ?
>
> From the way it sounds, you are trying to put zero length strings in a not-null
> column. You need to divorce your thinking from all other programatic languages
> and think in terms of how Oracle works. In the Oracle world currently (there is
> a hint that this will change at some point in the future), a zero-length string
> IS a null string and therefore you cannot put a zero-length string into a
> non-null column. You either need to modify the table to make the column nullable
> (preferred) or else insert a dummy value into the column (which is a waste of
> space).
>
> Ken
Received on Tue Jul 20 1999 - 09:44:43 CDT

Original text of this message

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