概述
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
$tk_Ids = M("LsnSelected")->where("use_tool=8 AND tk_roomId is null")->select(); (正确)
$tk_Ids = M("LsnSelected")->where("use_tool=8 AND tk_roomId=NULL")->select(); (错误)
==========================================================================================================
说明:
1、查询字段值为空的语法:where is null
2、查询字段值不为空的语法:where is not null
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
最后
以上就是故意鱼为你收集整理的mysql 字段为空_MySQL如何正确查询字段为NULL的字段的全部内容,希望文章能够帮你解决mysql 字段为空_MySQL如何正确查询字段为NULL的字段所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复