In MySQL compatibility mode, the following SQL succeeds and returns 0:
CREATE TABLE test2 (i INTEGER NOT NULL);
INSERT INTO test2 VALUES (NULL);
SELECT * FROM test2;
It fails as expected in the default mode. It also fails with MySQL 5.5 / InnoDB. Does "MySQL compatibility" actually mean "MyISAM compatibility"?
0
if you useINSERT INTO test2 VALUES (NULL), (NULL);
- at least in the default sql_mode. I think I also saw it insert0
with a single value insert, but I can't recall the exact circumstances.