mysql8有效,5.7无效
drop table test;
create table test(
a varchar(50) not null check ( length(trim(a))>0 )
);
insert into test(a) values(' ');
参考:
https://dev.mysql.com/doc/refman/8.0/en/create-table-check-constraints.html
mysql8有效,5.7无效
drop table test;
create table test(
a varchar(50) not null check ( length(trim(a))>0 )
);
insert into test(a) values(' ');
参考:
https://dev.mysql.com/doc/refman/8.0/en/create-table-check-constraints.html