mysql查找字段空、不为空的方法总结
1、1.不为空
select * from table where id <> "";
select * from table where id != "";


2、2.为空
select * from table where id ="";
select * from table where isNull(id);
具体情况具体分析,如果字段是char或者varchar类型的,使用id=""可以的;
如果字段是int类型的,使用isNull会好些。

声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
阅读量:186
阅读量:131
阅读量:182
阅读量:52
阅读量:174