如果想过滤掉mysql查出来为null的数据,有两种方法
第一种
select * from user where name is not null;
第二种
select * from user where ISNULL(name)=0;
过滤空字符串的方法
select * from user where ISNULL(name)=0 and LENGTH(trim(name))>0;
如果想过滤掉mysql查出来为null的数据,有两种方法
第一种
select * from user where name is not null;
第二种
select * from user where ISNULL(name)=0;
过滤空字符串的方法
select * from user where ISNULL(name)=0 and LENGTH(trim(name))>0;