mysql查找字段空、不为空的方法总结
1、不为空
Select * From table Where id<>""
Select * From table Where id!=""
2、为空
Select * From table Where id=""
Select * From table Where ISNULL(id)
具体情况具体分析,如果字段是char和varchar型用 id=""可以;如果是int型用 ISNULL好些
Select * From table Where id<>""
Select * From table Where id!=""
2、为空
Select * From table Where id=""
Select * From table Where ISNULL(id)
具体情况具体分析,如果字段是char和varchar型用 id=""可以;如果是int型用 ISNULL好些
声明:该文观点仅代表作者本人,入门客AI创业平台信息发布平台仅提供信息存储空间服务,如有疑问请联系rumenke@qq.com。
- 上一篇: MySQL 字符串截取函数
- 下一篇:没有了