List:General Discussion« Previous MessageNext Message »
From:Bob Hall Date:September 16 2003 1:03am
Subject:Re: Does Null == ""?
View as plain text  
On Mon, Sep 15, 2003 at 12:46:50PM -0400, Randy Chrismon wrote:
> an exort from a Lotus Notes database. At some point, the MySQL
> documentation says that a table with no nullable columns is
> better/faster than one with. The Lotus Notes database I'm migrating,
> however, has many fields with no values. I infer from the MySQL
> documentation that I'm better off doing:
> 
> create table my_table(a_field varchar(16) NOT NULL default "", ...)
> 
> and exporting my values from Notes as "" rather than using NULL. 

No. The meaning of NULL is defined in the SQL specification; it means 
"not known" or "not applicable". If you have data that is missing because 
it is not known or not applicable, then use NULL. 

A zero-length string has no defined meaning. I've done maintenance on 
databases that contained zero-length strings, and they were nightmares.
I can't think of any reason why you would use a zero-length string in 
a database.

Bob Hall
Thread
Does NULL == ""?Randy Chrismon15 Sep
  • Re: Does NULL == ""?Bruce Feist15 Sep
  • RE: Does NULL == ""?Mark Richards15 Sep
  • Re: Does NULL == ""?Brent Baisley15 Sep
    • Re: Does NULL == ""?Keith C. Ivey15 Sep
  • Re: Does NULL == ""?Paul DuBois15 Sep
Re: Does NULL == ""?Alec.Cawley15 Sep
  • RE: Does NULL == ""?Mark Richards15 Sep
Re: Does Null == ""?Randy Chrismon15 Sep
  • RE: Does Null == ""?Mark Richards15 Sep
  • Re: Does Null == ""?Bob Hall16 Sep
    • Re: Does Null == ""?Bruce Feist16 Sep
      • Re: Does Null == ""?Dan Nelson16 Sep
        • Re: Does Null == ""?Bruce Feist16 Sep
          • Re: Does Null == ""?Bob Hall16 Sep
        • Re: Does Null == ""?Bob Hall16 Sep
      • RE: Does Null == ""?Jon Frisby16 Sep
        • Re: Does Null == ""?Bruce Feist16 Sep
          • RE: Does Null == ""?Jon Frisby16 Sep
            • Re: Does Null == ""?Bruce Feist16 Sep
              • RE: Does Null == ""?Jon Frisby16 Sep
              • Re: Does Null == ""?Bob Hall17 Sep
        • Re: Does Null == ""?Bob Hall16 Sep
      • Re: Does Null == ""?Bob Hall16 Sep
    • Re: Does Null == ""?Bob Hall17 Sep
      • Re: Does Null == ""?Bruce Feist18 Sep
        • Re: Does Null == ""?Bob Hall18 Sep
  • Re: Does Null == ""?Haydies18 Sep
    • Re: Does Null == ""?Bob Hall18 Sep