Quick Ref.
Compatibility
NULLIF(f1, f2)
Engine OK Alternative
ingres yes
mysql yes
oracle yes
postgres yes
sqlserver yes

NULLIF

NULLIF returns NULL if the two arguments are equal; otherwise NULLIF returns the first argument.

  NULLIF(x,y) = NULL if x=y
  NULLIF(x,y) = x if x != y 
NULLIF can be used to replace a specific value with NULL. In this example the party Lab is replaced with NULL.

Results
See also: