`NULLIF` in Postgres
If there multiple values in a database column that both mean the the column for that row has no data, then the NULLIF
function can be used in queries to normalize the values in that column.
Null char is 😵
chriserin=# \pset null 😵
Null display is "😵".
chriserin=# select nullif('NOTHING', 'NOTHING');
nullif
--------
😵
(1 row)
chriserin=# select nullif('something', 'NOTHING');
nullif
-----------
something
(1 row)
Tweet