sql使用!=查询时会忽略null数据
2024-10-20 04:02:00
table_a有3条数据 column1值分别为1,0,null
那么
select * from table_a where column1!='1' 只会查到clumn1为0的数据,null的数据查不出,因为null数据数据库视为特殊数据,
如果同时查除null的数据则需如下写法:
select * from table_a where column1!='1' or column1 is null;
最新文章
- 简单说说call 与apply
- hadoop(2014/0619)
- Atitit USRqc62204 证书管理器标准化规范
- Jmeter 提取http请求返回值里json数据参数化方法
- Grafana 安装
- shenyi 语录
- [BS-17] iOS开发-Alpha,Hidden和Opaque区别
- 为什么X86汇编中的mov指令不支持内存到内存的寻址?
- 查看事务锁:innodb_trx+innodb_locks+innodb_lock_waits
- Objective-C /iphone开发基础:分类(category,又称类别)
- Visual Studio 2015 Owin+MVC+WebAPI+ODataV4+EntityFrawork+Identity+Oauth2.0+AngularJS 1.x 学习笔记之";坑";
- 数据库中的索引Index
- Discuz经典函数注释之authcode
- 7_linux下PHP、Apache、Mysql服务的安装
- Hibernate框架学习之注解配置关系映射
- Redux,基础
- Timer与TimerTask
- SAP 销售条件表增强栏位
- js函数和变量的声明与执行顺序
- Linux 安装python3.7.0
热门文章
- 初始化安装后 Nacos 动态路由配置不生效
- net core 添加cors,解决跨域问题
- 全国计算机二级python备考
- rust vec排序
- LCD1602液晶屏
- tp-link路由器后台_硬解
- RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu!
- CentOS 7.6 部署zabbix 6.0 支持Kubernetes
- 【剑指Offer】【树】序列化二叉树
- python 搭建自启动FTP服务器,编译后exe后个人随时可用,非常方便