NULLIF(value1, value2)The
NULLIF function returns a null value if value1 equals value2; otherwise it returns value1. This can be used to perform the inverse operation of the COALESCE example given above:Functions / Conditional Expressions
The NULLIF function returns a null value if value1 equals value2; otherwise it returns value1.
Reading PG 18current·documented in 27 of 27 versions, 7.1 to 20
NULLIF(value1, value2)The
NULLIF function returns a null value if value1 equals value2; otherwise it returns value1. This can be used to perform the inverse operation of the COALESCE example given above:Definition snapshot: b7bd9cda · English manual source