> > mysql> CREATE TABLE t (a INT NOT NULL DEFAULT 0);
> > Query OK, 0 rows affected (0.00 sec)
> >
> > mysql> INSERT INTO t (a) VALUES (NULL);
> > ERROR 1048: Column 'a' cannot be null
> 
> Just leave the NOT NULL column out when inserting and it will 
> get set to its  default.

It's not just one sql statement. There is a lot of code that relies on the
DEFAULT values being automatically added. I'm guessing this is a bug because
it's supposed to work, according to the manual:

http://www.mysql.com/documentation/mysql/bychapter/manual_Introduction.html#
constraint_NOT_NULL


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

Reply via email to