Testing a column for null values  Substituting a value for NULLs

Chapter 2: Queries: Selecting Data from a Table

Difference between FALSE and UNKNOWN

There is an important logical difference between FALSE and UNKNOWN: the opposite of false (“not false”) is true, while the opposite of UNKNOWN is still UNKNOWN. For example, “1 = 2” evaluates to false and its opposite, “1 != 2”, evaluates to true. But “not unknown” is still unknown. If null values are included in a comparison, you cannot negate the expression to get the opposite set of rows or the opposite truth value.





Copyright © 2005. Sybase Inc. All rights reserved. Substituting a value for NULLs

View this book as PDF