I created a table in mysql
create table test (id int primary key not null auto_increment, vs varchar(255) not null);
at startup
insert into test (vs) values (null);
Gives an error message:
ERROR 1048 (23000): Column 'vs' cannot be null
But when I try to insert two lines
insert into test (vs) values (null),(null);
It works, and the result is:
mysql> select * from test; +----+----+ | id | vs | +----+----+ | 1 | | | 2 | | +----+----+
The vs field is not NULL, I wonder if this is a function.
source share