News for hackers. Stuff that matters.
Re:SQL NULLs Are Weird by kurtbuilds on Thursday January 09, 2025 @12:59PM (#42648155)
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

Re:SQL NULLs Are Weird by blast on Thursday January 09, 2025 @08:26PM (#42651574)
Having that is much better than not having it, but man is it verbose and confusing.