Jason Spears wrote:
>
> On Mon, 31 May 1999, Michal Ludvig wrote:
>
> >Hi,
> >I have got a following table:
> >
> >: CREATE TABLE ip_tbl (
> >: ipid int(10) unsigned DEFAULT '0' NOT NULL,
> >: ip varchar(18) DEFAULT '' NOT NULL,
> >: dn varchar(64) DEFAULT '' NOT NULL,
> >: dn1 int(10) unsigned DEFAULT '0' NOT NULL,
> >: dn2 int(10) unsigned DEFAULT '0' NOT NULL,
> >: rtime int(10) unsigned DEFAULT '0' NOT NULL,
> >: flag int(10) unsigned DEFAULT '0' NOT NULL,
> >:
> >: PRIMARY KEY (ipid),
> >: UNIQUE ip (ip),
> >: UNIQUE dn (dn),
> >: KEY dn1 (dn1),
> >: KEY dn2 (dn2),
> >: KEY rtime (rtime),
> >: KEY flag (flag)
> >: );
>
> I'm a bit new to SQL, but your definitions of the ip and dn columns
> both look strange to me. How can you specify a DEFAULT '' NOT NULL
> column? Does '' not represent NULL? If so, mySQL should barf
> on the table definition itself, but you never know...
>
> HTH,
>
> Jason Spears
Jason:
DEFAULT '' NOT NULL is actually acceptable. '' is an empty string, which
is not the same as NULL
--
Sasha Pachev
http://www.sashanet.com