How MySQL NULLIF() control flow function is similar to CASE statement?


As we know that MySQL NULLIF() control flow function will return NULL if both the arguments are the same, otherwise it returns the first argument. Hence it is similar to the following CASE statement −

CASE
WHEN expression1=expression2 THEN NULL
ELSE
Expression2
END.

Lakshmi Srinivas
Lakshmi Srinivas

Programmer / Analyst / Technician

Updated on: 22-Jun-2020

67 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements