我正试图使用多个插入(在一个语句中),我有这个表格结构
CREATE TABLE Scores
(
studentID varchar(50) not null,
score int
)
ENGINE = InnoDB
我的查询 :
INSERT INTO Scores Values
( Barry , 45),
(NULL, 41),
( Jones , 53)
This statement (I expected) should fail since [StudentID] column does not accept NULL. The problem was MySQL inserted empty string ( ) into row 2... and allow the rest to continue.