On Wed, February 21, 2007 4:14 pm, Michael Reece wrote:
> 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?

Yes. You get

mysql> insert into bars(id) values(2);
ERROR 1364 (HY000): Field 'foo' doesn't have a default value

setting default NULL and not NULL on a column is a way of specifying that
the user must provide a non-NULL value during insert.

Graham.



-------------------------------------------------------------------------
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

Reply via email to