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 versus empty string

Re: NULL versus empty string

From: Brian E Dick <bdick_at_cox.net>
Date: Tue, 24 Sep 2002 13:37:32 GMT
Message-ID: <wUZj9.23109$IL6.1270736@news2.east.cox.net>


It was an implementation decision made back when storage was small and expensive. Instead of using separate null and length fields, the database "doubles up" the use of a single field to represent both null and length and thus saves a few bytes of storage.

"David Wall" <d.wall_at_computer.org> wrote in message news:KcOj9.2$Yy5.392_at_news03.micron.net...
> What's the apparent rationale for Oracle treating an empty string and a
NULL
> value as the same? I have a NOT NULL VARCHAR2 field, and I cannot enter
an
> empty string since it rejects it as being null. However, null in other
> databases means that the attribute is not set, not that it's just empty.
> Most programming languages understand the difference between "" (an empty
> string) and null/0, meaning nothing is set.
>
> Is there a comparable feature in Oracle that I can set that prevents it
from
> being NULL, but will allow an empty string in a VARCHAR2?
>
> Thanks,
> David
>
>
Received on Tue Sep 24 2002 - 08:37:32 CDT

Original text of this message

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