NULL Functions: COALESCE, IFNULL & NULLIF
Learn NULL Functions: COALESCE, IFNULL & NULLIF (MySQL Functions, MySQL) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.
Introduction NULL means "unknown or missing". COALESCE(a,b,...) returns the first non-NULL argument, IFNULL(a,b) is its two-argument form, and NULLIF(a,b) returns NULL when both are equal, otherwise a .