From this question comments,
In the documentation (dev.mysql.com/doc/refman/5.7/en/insert.html), inserting with
INSERT INTO tbl_name () VALUES();
is mentioned. It is allowed except for what the doc says : “If strict mode is not enabled, MySQL uses the implicit default value for any column that has no explicitly defined default. If strict mode is enabled, an error occurs if any column has no default value.”
We were then wondering what that actually means because with strict mode,
CREATE TABLE foo ( x varchar(255) ); INSERT INTO foo VALUES (x);
is still permitted, so it seems like strict mode fails. Moreover, the CREATE TABLE
implicitly creates a DEFAULT null
just as if it was created explicitly.