当前位置:网站首页>MYSQL 用!=查询不出等于null的数据,解决办法
MYSQL 用!=查询不出等于null的数据,解决办法
2022-07-04 20:33:00 【monody666】
例如,某个字段有null、“0”、“1”三种,因为默认值为null,有时需要查询null或者0的数据。如果直接用 xxx != “1”,只能查询出“0”的。所有需要用别的写法。
1.xxx IS NULL OR xxx != "1"
2.NOT(xxx <=> "1")
因为 = 不能比较null,<=>可以.(<>相当于!=,起不到<=>这种包含null比较的效果)
边栏推荐
- Maya lamp modeling
- 杰理之AD 系列 MIDI 功能说明【篇】
- 软件开发过中的采购
- WGCNA analysis basic tutorial summary
- Poster cover of glacier
- NetWare r7000 Merlin system virtual memory creation failed, prompting that the USB disk reading and writing speed does not meet the requirements. Solution, is it necessary to create virtual memory??
- redis管道
- Jerry's ad series MIDI function description [chapter]
- Explication détaillée du mécanisme de distribution des événements d'entrée multimodes
- Jerry's ad series MIDI function description [chapter]
猜你喜欢

五子棋 上班摸鱼工具 可局域网/人机

华为ensp模拟器 实现多个路由器的设备可以相互访问

ApplicationContext 与 BeanFactory 区别(MS)

【微信小程序】协同工作与发布
![Jerry added the process of turning off the touch module before turning it off [chapter]](/img/28/5e4eb39243a0c973d0b90f76571f9b.png)
Jerry added the process of turning off the touch module before turning it off [chapter]

SolidWorks工程图添加材料明细表的操作

Word文档中标题前面的黑点如何去掉

A quick start to fastdfs takes you three minutes to upload and download files to the ECS

maya灯建模

JS卡牌样式倒计时天数
随机推荐
数十亿公民信息遭泄漏!公有云上的数据安全还有“救”吗?
搭建一个仪式感点满的网站,并内网穿透发布到公网 1/2
福昕PDF编辑器v10.1.8绿色版
torch.tensor和torch.Tensor的区别
华为ensp模拟器 给路由器配置DHCP
Redis bloom filter
ApplicationContext 与 BeanFactory 区别(MS)
__init__() missing 2 required positional arguments 不易查明的继承错误
Render function and virtual DOM
PS vertical English and digital text how to change direction (vertical display)
minidom 模块写入和解析 XML
CAD中能显示打印不显示
解读创客教育中的各类智能化组织发展
【Try to Hack】宽字节注入
插入排序,选择排序,冒泡排序
TweenMax表情按钮js特效
华为ensp模拟器 配置ACL访问控制列表
【1200. 最小绝对差】
杰理之AD 系列 MIDI 功能说明【篇】
Jerry's ad series MIDI function description [chapter]