oracle 字段中的null
来源:互联网 发布:软件流程图设计工具 编辑:程序博客网 时间:2024/05/16 04:53
假设有两张表,两张表通过Id关联,A表中包含B表的记录(B表记录比A表少):
A: Id,Name
B:id Address
按照一般的写法:select * from A where A.id not in (select id from B) ,就可以得到在A表中不在B表中的记录。
但是如果B表有些记录的ID字段为空的话,则一条记录都查不出来。 只有在B表上加上 Id is not null 才能查询出记录。很奇怪的!有人可以解释么?
备注:
如果发现自己的sql里查询不出来记录,则要看看表中那个字段里是否有记录为null,如果有,则需要加行 is not null 才行,否则查询不出你想要的记录。
- oracle 字段中的null
- oracle varchar2类型字段中的空字符串和null
- oracle字段 not null不一致
- Oracle中的null详解
- Oracle中的null
- ORACLE中的NULL
- Oracle中的NULL
- Oracle中的Null(再提)
- oracle中的''和null
- oracle 中的null
- Oracle中的NULL
- Oracle中的NULL
- Oracle中的NULL
- Oracle中的NULL
- ORACLE中的NULL
- oracle中的null
- oracle中的null
- ORACLE中的NULL
- linux-0.11调试教程,task3(04),sa_restore函数
- osganimationviewer例子
- android Content Provider详解九
- 373. Saying is one thing and doing anothor. 言行不一
- 在android上开启root权限临时解决方法
- oracle 字段中的null
- js笔记(对象)
- tomcat配置证书
- linux驱动注册的相关函数
- stat()—获取文件状态
- 关于嵌入式和产品的区别
- ExtJs xtype一览
- Dead Man's Island——4、The Locked Room
- LINUX驱动编程之LED驱动