On mysql data insertion, I have encountered following issue. Here email field cannot be null. While executing following queries (Query 1 & 2), we are expecting errors. But query 1 gives error and query 2 gives success.
Table Structre
CREATE TABLE `users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(100) NOT NULL,
`email` varchar(100) NOT NULL,
PRIMARY KEY (`id`),
KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=latin1
Query 1:
INSERT INTO `users` (`id`, `name`, `email`) VALUES (NULL, 'manu', NULL);
Result:-#1048 - Column 'email' cannot be null
Query 2:
INSERT INTO `users` (`id`, `name`, `email`)
VALUES (NULL, 'manu', NULL),(NULL, 'Jose', NULL);
Result:-2 rows inserted.

Is there any error in the query? Any thoughts will be appreciated.