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
From: Randy Chrismon [mailto:rchrismon@stripped]
Sent: Monday, September 15, 2003 12:47
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.
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql