[database] [Database] Toward better databases
David Timothy Strauss
david at fourkitchens.com
Tue Jul 8 03:02:52 UTC 2008
MySQL requires non-null defaults for non-null columns. What's the problem?
----- "Joshua D. Drake" <jd at commandprompt.com> wrote:
> On Mon, 2008-07-07 at 20:42 -0500, Larry Garfield wrote:
> > On Monday 07 July 2008 8:44:40 am you wrote:
> > > Howdy, everyone. Here's my current brain-dump:
>
> > CREATE TABLE variable (
> > name varchar(128) NOT NULL default '',
> > value text NOT NULL,
> > PRIMARY KEY (name)
> > )
> >
>
> I would also note that the above is horribly bad.
>
> You just said that your primary key is name but that its default is
> '',
> that protects against NOT NULL but allows a single '' as well as a
> single ' ' or ' ' or ' ' etc...
>
> Sincerely,
>
> Joshua D. Drake
>
>
> _______________________________________________
> Database mailing list
> Database at drupal.org
> http://mail.drupal.org/mailman/listinfo/database
More information about the Database
mailing list