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