Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1205898
  • 博文数量: 350
  • 博客积分: 10
  • 博客等级: 民兵
  • 技术积分: 5668
  • 用 户 组: 普通用户
  • 注册时间: 2011-03-23 17:53
文章分类

全部博文(350)

文章存档

2013年(350)

分类: Oracle

2013-04-27 09:49:51

NULL值是一个很特别的值。它即不是零,也不是空格。它的值是没有定义的,未知的,不确定的。 一些英文书中用了如下的词来形容NULL: “unavailable, unassigned, undefined, unknown, immeasurable, inapplicable” 总之您没有办法得到它的准确值。
正是因此,NULL和任何值(包括NULL)比较,得出的结果还是NULL,还是不确定

俺恰好这两天刚仔细研究了关于null的定义,有位前辈做了很精妙的总结,俺贴出来供参考,如下:~~~


与时:
false and false = false  false and true = false  false and null = false
true and false = false  true and true = true  true and null = null
null and false = false  null and true = null  null and null = null

或时:
false or false = false  false or true = true  false or null = null
true or false = true  true or true = true  true or null = true
null or false = null  null or true = true  null or null = null


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