当前位置:网站首页>Exclude null values when Oracle limits
Exclude null values when Oracle limits
2022-08-09 07:33:00 【The millennium -】
1.Oracle特性
Oracle有个特性,just when limited,Null values are also excluded:
例如:
select '小黑'name,'2'class from dual
union all select '小白'name,'0'class from dual
union all select '小红'name,'1'class from dual
union all select '小绿'name,'4'class from dual
union all select null name,'5' class from dual
If you exclude black,Then you will get data like this:
select * from (select '小黑'name,'2'class from dual
union all select '小白'name,'0'class from dual
union all select '小红'name,'1'class from dual
union all select '小绿'name,'4'class from dual
union all select null name,'5' class from dual)where name<>'小黑'
The database excludes the data of Xiaohei at the same time,也将class为5data were also excluded
2.解决
The problem is also solved very well,Just add it after the limitor name is null,即可:
select * from (select '小黑'name,'2'class from dual
union all select '小白'name,'0'class from dual
union all select '小红'name,'1'class from dual
union all select '小绿'name,'4'class from dual
union all select null name,'5' class from dual)where name<>'小黑' or name is null
边栏推荐
- 74HC595 chip pin description
- SiamFC:用于目标跟踪的全卷积孪生网络 fully-convolutional siamese networks for object tracking
- HDU - 3183 A Magic Lamp 线段树
- Anaconda use proxy
- 浅识微服务架构
- Forest Program dfs+tanjar仙人掌
- 灵活好用的sql monitoring 脚本 part7
- imageio读取.exr报错 ValueError: Could not find a backend to open `xxx.exr‘ with iomode `r`
- MUV LUV EXTRA 2019CCPC秦皇岛站J题 KMP
- Better Scroll Y上下滚动无法上拉滚动解决办法
猜你喜欢
随机推荐
MUV LUV EXTRA 2019CCPC Qinhuangdao Station J Question KMP
浅识微服务架构
贪吃蛇小游戏——C语言
2017 G icpc shenyang Infinite Fraction Path BFS + pruning
Snake game, C language
MySQL高级特性之分布式(XA)事务的介绍
接口测试概念
链表专项练习(三)
SiamFC:用于目标跟踪的全卷积孪生网络 fully-convolutional siamese networks for object tracking
【Template】Tree Chain Segmentation P3384
es6 基础知识详解 变量 字符串 解构赋值 函数 对象 从入门到精通
力扣208,实现Trie(前缀树)
一键登陆服务器脚本
Lottie系列二:高级属性
imageio读取.exr报错 ValueError: Could not find a backend to open `xxx.exr‘ with iomode `r`
DIMP:Learning Discriminative Model Prediction for Tracking 学习判别模型预测的跟踪
Win10桌面图标排列混乱
毕业我选择了保家卫国,退伍我选择了华为外包
yolov5检测数据集标签数量
Oracle 限制时将空值排除