On 16 Jun 2003 at 19:29, Becoming Digital wrote:

> Think of the many cases in which you would not want a field left
> blank: a customer's last name or zip code, a product's name or id
> number, a payment amount.  Were any of those fields allowed to be
> NULL, the system of which they are a part could fall on its face.  We
> wouldn't want that, would we?

You are using "left blank" to mean "set to NULL", but many people 
would describe a last name of "" (the empty string) as blank, and 
using NOT NULL does nothing to prevent that.  Also, if a zip code 
were allowed to be 'ABCDE', the system would fall on its face just as 
much, and NOT NULL does nothing there either.

I would recommend using NOT NULL for any column where you're not 
specifically making use of NULL values.  It saves complication as 
well as a bit of space.  But it's no substitute for validating the 
data before inserting it into your table.

-- 
Keith C. Ivey <[EMAIL PROTECTED]>
Tobacco Documents Online
http://tobaccodocuments.org


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to