Hacker News new | ask | show | jobs
by kurtbuilds 523 days ago
If you want equality testing with nulls, you want to use `is (not) distinct from` instead of `=` and `<>` / `!=`.

`1 is not distinct from NULL` => false

`NULL is not distinct from NULL` => true

`0 is not distinct from 1` => false

1 comments

Having that is much better than not having it, but man is it verbose and confusing.