At 11:51 -0500 11/26/03, Millaway, John wrote:
Inserting a NULL into a NOT NULL column used to automatically get the
DEFAULT value. I realize that it was non-portable, non-standard behavior,
but the code relies on it. How do I get this behavior in the 4.0.x server?
mysql> CREATE TABLE t (a INT NOT
> > 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
On Wednesday 26 November 2003 17.51, Millaway, John wrote:
> Inserting a NULL into a NOT NULL column used to automatically get the
> DEFAULT value. I realize that it was non-portable, non-standard behavior,
> but the code relies on it. How do I get this behavior in the 4.0.x server?
>
> mysql> CRE