3 ms·
This is correct behaviour. You are supposed to use `isNaN()`, which makes perfect sense. This is the same as SQL where `NULL IS NULL` is true, but `NULL = NULL
by brendoncrawford 15y ago
This is correct behaviour. You are supposed to use `isNaN()`, which makes perfect sense.
This is the same as SQL where `NULL IS NULL` is true, but `NULL = NULL` is not true.
- blahedo 15y agoEven better: since SQL has a tri-valued logic (T, F, Unknown) it can assign "Unknown" as the result of a test against NULL. That means that `3 = NULL` is not true, but `3 != NULL` is also not true. If testing against NULL were merely false, then you'd have the bizarre result that val > 3 and not (val <= 3) might return different results! (I was just teaching this today in my DB class! Fun.)