List:General Discussion« Previous MessageNext Message »
From:Randy Chrismon Date:September 15 2003 4:46pm
Subject:Re: Does Null == ""?
View as plain text  
> Null is a special value and cannot be tested in the same manner as a
> > string
> or other value.  Yes, there is a difference.  If the column is Null, a
> comparison operation such as a.field == ""  or a.field ==
"something" > will
> both return Null.

> Maybe this document will help:

> A.5.3 Problems with NULL Values
--SNIP lots of good info--

Thanks for the info. Actually, I hadn't gotten as far as thinking
about testing. I am at the point of designing some tables to receive
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. 

Thanks. 

Randy
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