List:General Discussion« Previous MessageNext Message »
From:Mark Richards Date:September 15 2003 5:02pm
Subject:RE: Does Null == ""?
View as plain text  
That sounds reasonable to me, but better let more experienced hands,
particularly in db design, chime in here...

There are some good reasons to allow Null, so perhaps it would be wise to
consider some other ideas before plunging forward. :)

Just my 0.02



-m-


-----Original Message-----
From: Randy Chrismon [mailto:rchrismon@stripped] 
Sent: Monday, September 15, 2003 12:47
To: mysql@stripped
Subject: Re: Does Null == ""?

> 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

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/mysql?unsub=1


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