i am curious, if you "set sql_mode=strict_trans_tables;", what happens if you "insert into bars set id=1;" (with the original schema that had an id column, of course)?
does it give the "cannot be null" error? (i don't have mysql 5.0.2+ installed and strict_trans_tables is not an option for 4.1.7) On Feb 21, 2007, at 12:50 PM, Ask Bjørn Hansen wrote: > > On Feb 21, 2007, at 12:35, Michael Reece wrote: > >>> MySQL, correctly, says the default is NULL: >> >> i was say erroneously, not correctly. >> >> if you try this: >> >> insert into bars set id=1 ; >> select * from bars ; >> >> you will see that the foo column is '', not NULL, suggesting the >> default really is ''. > > You got the SQL_MODE setting "wrong". :-) > > set sql_mode=strict_trans_tables; > > CREATE TABLE `bars` ( `foo` varchar(255) NOT NULL ) ENGINE=InnoDB; > Query OK, 0 rows affected (0.02 sec) > > insert into bars (foo) values (NULL); > ERROR 1048 (23000): Column 'foo' cannot be null > > > - ask > > -- > http://develooper.com/ - http://askask.com/ > > > > ---------------------------------------------------------------------- > --- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to > share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php? > page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Rose-db-object mailing list > Rose-db-object@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/rose-db-object --- michael reece :: software engineer :: [EMAIL PROTECTED] ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Rose-db-object mailing list Rose-db-object@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rose-db-object