Search notes:

SQL: NULLIF

The expression nullif(p1, p2) evaluates to null if p1 == p2, otherwise to p1.
nullif(p1, p2) is equivalent to the following case expression:
case
   when p₁ = p₂ then null
   else p₁
end

Index