Comment by dotancohen
4 years ago
> Existence of such value introduces three value logic because expression "NULL = <anything>" is neither true nor false.
Could you elaborate on that? I'm thought that in SQL `NULL=NULL` returns FALSE, much like the floats `NAN==NAN` returns false:
> select if(null=null, "Yes", "No")
> +----------------------------+
> | No |
> +----------------------------+
What does it mean that this is neither TRUE or FALSE? I very much appreciate the lesson!
The value in your if is not false, it's NULL. NULL=NULL behaves exactly like NULL=42, the value is NULL. Which is what the parent was trying to explain.
With Postgres:
I see, thank you. This behaviour is news to me.