At 9:30 AM -0400 9/20/03, Steven Hilton wrote:
I am experiencing odd behavior, and I'm hoping someone can tell me if
I'm doing something wrong or explain why it is behaving this way, and
how to get around it...

When I update a row in a table with a field's data set to NULL, but
the table has a NOT NULL restriction on the field, the update still
completes successfully, but transforms the NULL value to an empty
string.

Right. If you update a NOT NULL column to NULL, the column is assigned the default value for the column type. See:

http://www.mysql.com/doc/en/CREATE_TABLE.html

Read the para that begins "A DEFAULT value has to be...", which describes
what the default values are for each column type.


-- Paul DuBois, Senior Technical Writer Madison, Wisconsin, USA MySQL AB, www.mysql.com

Are you MySQL certified? http://www.mysql.com/certification/


-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to