NULL is handled like "unknow"
When you comparing something with an unknown value, you are not able to say if they are equal or not. So the result is also unknown. The result NULL is correct.
If you whant to check if somethings is NULL you have to use "(anything) IS NULL"
Rich Hall schrieb:
My question is why is the form
"(anything) = NULL"
allowed?
Since
"(anything) = NULL" is always Null, this cannot be what the coder
intended.
This is much different when comparing two variables, where the coder may have to handle the cases where the variables are Null. Here the comparison is to a constant.
Rick
---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faqs/FAQ.html
---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faqs/FAQ.html