On Sun, 29 Aug 2004 20:50:05 -0700, Darren Duncan <[EMAIL PROTECTED]> wrote: > At 8:09 PM -0700 8/29/04, Jonathan Leffler wrote: > >Darren Duncan wrote: > >>At 6:53 PM -0400 8/29/04, Paul G. Weiss wrote: > >>>MySQL works just as you describe. > >>>-P > >>Even so, it is on the MySQL to-do list that such non-standard > >>behaviour is going to be changed. Hopefully sooner rather than > >>later. -- Darren > >Why break a perfectly sensible system? > > I'll quote some sections from the MySQL TODO, to illustrate what I'm > saying. Pay particular attention to: > * Don't add automatic DEFAULT values to columns. Produce an error > for any INSERT statement that is missing a value for a column that > has no DEFAULT .
Under standard SQL, you can consider the 'default DEFAULT' to be NULL, even for columns which do not accept nulls. Consequently, if the column does not permit nulls and has no explicit default, you get a constraint error. Any other default DEFAULT than NULL would be a compliance issue - but NULL should be OK. Well, that's the way it seems to me. I don't use MySQL, but fixing this 'bug' would not encourage me to use it. -- Jonathan Leffler <[EMAIL PROTECTED]> #include <disclaimer.h> Guardian of DBD::Informix - v2003.04 - http://dbi.perl.org "I don't suffer from insanity - I enjoy every minute of it."
