s**********r 发帖数: 565 | | f***g 发帖数: 10 | 2
A value of NULL indicates the value is unknown. A value of NULL is different
from an empty or zero value. No two null values are equal. Comparisons between
two null values, or between a NULL and any other value, return unknown because
the value of each NULL is unknown.
Null values usually indicate data that is unknown, not applicable, or to be
added at a later time. For example, a customer's middle initial may not be
known at the time the customer places an order.
【在 s**********r 的大作中提到】 : why? thanks
| s**********i 发帖数: 711 | 3
NULL is NULL. null is not unkown. if you know a value
is null, it's not any other value, it's just null.
basically null means no set value.
【在 f***g 的大作中提到】 : : A value of NULL indicates the value is unknown. A value of NULL is different : from an empty or zero value. No two null values are equal. Comparisons between : two null values, or between a NULL and any other value, return unknown because : the value of each NULL is unknown. : Null values usually indicate data that is unknown, not applicable, or to be : added at a later time. For example, a customer's middle initial may not be : known at the time the customer places an order.
| h****e 发帖数: 204 | 4 nop, NULL is NULL, which means uncomparable "value", if this makes some
sense to you.
【在 s**********r 的大作中提到】 : why? thanks
| l********h 发帖数: 16 | 5 What did you try to do?
Why did you want to compare NULL to NULL?
Could you provide your SQL statement?
【在 s**********r 的大作中提到】 : why? thanks
| h*****n 发帖数: 439 | 6 well, maybe this is useful for dating service, bf/gf search engine. :P
select a.ID, a.FirstName, a.LastName, b.ID, b.FirstName, b.LastName
from Male a, Female b
where ( a.GirlFriendID IS NULL and a.IsGay = FALSE and
b.BoyFriendID IS NULL and b.IsLesbian = FALSE)
【在 l********h 的大作中提到】 : What did you try to do? : Why did you want to compare NULL to NULL? : Could you provide your SQL statement?
|
|