Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1182568
  • 博文数量: 398
  • 博客积分: 10110
  • 博客等级: 上将
  • 技术积分: 4055
  • 用 户 组: 普通用户
  • 注册时间: 2007-12-23 20:01
个人简介

新博客http://www.cnblogs.com/zhjh256 欢迎访问

文章分类

全部博文(398)

文章存档

2012年(1)

2011年(41)

2010年(16)

2009年(98)

2008年(142)

2007年(100)

我的朋友

分类: Oracle

2008-04-18 22:40:55

在in中包含null时,同正常的in,当然null in (null)除外,如下:
SQL> select 'a' from dual where 1 in(1,2,'');
'A'
---
a
SQL> select 'a' from dual where null in(1,2,'');
'A'
---
SQL> select 'a' from dual where null in(null);
'A'
---
 
在not in中包含null时,条件相当于永远不成立(或者unknown),如下:
SQL> select 'a' from dual where 1 not in(1, null);
'A'
---
SQL> select 'a' from dual where 1 not in(3, null);
'A'
---
 
SQL> select 'a' from dual where null not in(null);
'A'
---
 
SQL> select 'a' from dual where null not in(null,4);
'A'
---
 
 
阅读(1054) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~