Chinaunix首页 | 论坛 | 博客
  • 博客访问: 130264
  • 博文数量: 69
  • 博客积分: 595
  • 博客等级: 中士
  • 技术积分: 670
  • 用 户 组: 普通用户
  • 注册时间: 2008-04-16 17:37
文章分类

全部博文(69)

文章存档

2017年(2)

2016年(9)

2015年(13)

2014年(30)

2012年(4)

2011年(2)

2010年(2)

2009年(5)

2008年(2)

我的朋友

分类: LINUX

2015-12-31 07:19:19

In db2, null could be anything. But some time when we join tables by using join condition which involves null values, we should remember that :
a.cola = b.colb  --  if both are null,  the condition is false, that is null = null  returns false.
a.cola <> b.colb  -- if both are null, the condition is false, that is  NULL <> NULL returns False

  • 7 = NULL => False
    7 > NULL => False
    7 <> NULL => False
     
  • NULL = NULL => False
    NULL <> NULL => False
     
  • NULL IN( 1, NULL, 3) => False
    NULL IN (1, 3) => False
    1 IN (1, NULL, 3) => True

阅读(343) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~