Buggy Buggy "NULL"

看了Jonathan Lewis 两篇关于NULL问题的文章

(1) Foreign Keys

(2) Null - again

觉得还是很有必要做下记录的。

 

关于对NULL在predicate和constraint中的不同处理方式,Jonathan给出如下的概括 -- 

 

"

One way to think about this is to work on the assumption that there is an important difference between predicates andconstraints.

  • predicate accepts rows if it evaluates to TRUE.
  • constraint accepts rows if it does not evaluate to FALSE.

"

以前注意比较多的还是在Predicate中的NULL(也包括在PL/SQL中 CASE WHEN / IF语句中对于NULL值的相关判断, 还有(NOT) IN-List 中对NULL的处理问题),对于constraint中的NULL值的注意还是不够。

 

 

posted @ 2012-09-07 10:41  FangwenYu  阅读(221)  评论(0编辑  收藏  举报