Darren Duncan said:

> Having NOT NULL with a PRIMARY KEY is redundant, if not an outright
> error.  Defining something as a primary key is implicitly defining it
> to be both not null and distinct. -- Darren Duncan

You'll find NOT NULL and PRIMARY KEY to be perfectly compatible, at least
in SQLite and MySQL.  Many DB systems do allow NULLs in the primary key,
even if that's not strictly to the standard.  Heaven help the poor souls
who do put NULLs in the primary key, but some systems assume that you know
what you're doing.

Clay Dowling
-- 
Lazarus Notes from Lazarus Internet Development
http://www.lazarusid.com/notes/
Articles, Reviews and Commentary on web development

Reply via email to