****MySQL中查询某一字段是否NULL,切记不可用 =NULL 或者 !=NULL,正确的方式是is null 或者 is not null
1、查询user表中的user_mobile不是NULL的数据
select * from user where user_mobile is not null;
2、查询user表中的user_mobile是NULL的数据
select * from user wher user_mobile is null;
****MySQL中查询某一字段是否NULL,切记不可用 =NULL 或者 !=NULL,正确的方式是is null 或者 is not null
1、查询user表中的user_mobile不是NULL的数据
select * from user where user_mobile is not null;
2、查询user表中的user_mobile是NULL的数据
select * from user wher user_mobile is null;