> >>I have an InnoDB table that looks like the following. > >> > >>CREATE TABLE `stuff` ( > >> `stuff_id` int(11) NOT NULL auto_increment, > >> `somevalue1` varchar(35) NOT NULL, > >> `somevalue2` varchar(35) NOT NULL, > >> PRIMARY KEY (`stuff_id`) > >>) TYPE=InnoDB COMMENT='stuff table'; > >> > >>I run the following insert statement. > >> > >>INSERT INTO stuff ( somevalue2 ) VALUES ('blah') > >> > >>Now the field "somevalue1" is empty. Doesn't this violate the NOT NULL > >>constraint on the field? > >> > Well, by empty you probably mean "", which is not null, is it?
This is wierd. If you define a field as not null is because you want the user to enter some data, for example, First Name and Last Name. Yes, I know one should check it at the application level but, isn't MySQL being a little too flexible with this? __ / \\ @ __ __ @ Adolfo Bello <[EMAIL PROTECTED]> / // // /\ / \\ // \ // Bello Ingenieria S.A, Presidente / \\ // / \\/ // // / // cel: +58 416 609-6213 /___//// / <_/\__\\//__/ // fax: +58 212 952-6797 www.bisapi.com // pager: www.tun-tun.com (# 609-6213) --------------------------------------------------------------------- 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