Hello. On Thu 2002-12-26 at 00:09:55 +0100, [EMAIL PROTECTED] wrote: > Hi there, > > I'm using MySql 3.23.?? with Connector/J on Win32. > My Problem is that the database lets me UPDATE NOT NULL Fields with > NULL-Values. > This is not a special Java Problem! > > For example: > The Field "Name" in tbl_Names is declared NOT NULL. > > UPDATE tbl_Names SET Name = NULL WHERE ID = 23; > ...works fine, but... > > INSERT INTO tbl_Names (Name) VALUES (NULL); > ...throws an NOT NULL Exception!!! > > The Field "Name" is declared NOT NULL. > > This occurs during both, Java-Executes and manual Command Line Entry! > > Is there a way to configure mysql to throw an error while trying to update > NOT NULL Fields with NULL??? > Is that a bug that will be fixed someday?
This is listed as known misbehaviour: http://www.mysql.com/doc/en/Bugs.html The short, general answer is: do not rely on MySQL to do input validation for you. HTH, Benjamin. -- [EMAIL PROTECTED] --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php