3 ms·
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 P
by yencabulator 5y ago
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:
postgres=# \pset null <null>
postgres=# select null, null=null, null=42;
?column? | ?column? | ?column?
----------+----------+----------
<null> | <null> | <null>
(1 row)
- dotancohen 5y ago> mysql> select 42=42,42=314,42=null,null=null; > +-------+--------+---------+-----------+ > | 42=42 | 42=314 | 42=null | null=null | > +-------+--------+---------+-----------+ > | 1 | 0 | NULL | NULL | > +-------+--------+---------+-----------+ I see, thank you. This behaviour is news to me.