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

Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle NULL vs '' revisited

Re: Oracle NULL vs '' revisited

From: hpuxrac <johnbhurley_at_sbcglobal.net>
Date: Fri, 17 Aug 2007 11:11:07 -0700
Message-ID: <1187374267.948474.171670@i13g2000prf.googlegroups.com>


On Aug 17, 10:49 am, Matthew Harrison <m.harris..._at_craznar.com> wrote:
> Ok, I'm developing another oracle application where the distinction
> between NULL and '' will be important.
>
> Given Oracle doesn't adhere to SQL standards for the distinction, is
> there any best practices for comparing, and storing blank strings in a
> table where the field is conceptually NOT NULL.

Having problems with "where the field is conceptually NOT NULL"?

Well it's either defined as NOT NULL in the database or it will allow nulls.

Why don't you define it as NOT NULL and remove the "is conceptually" out of the equation.

Providing a default value is also sometimes a good option.

Tom Kyte has a bunch to say on this area in his books and his site http://asktom.oracle.com Received on Fri Aug 17 2007 - 13:11:07 CDT

Original text of this message

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