This tutorial explains how to use the MySQL IFNULL function with syntax and examples.
The MySQL IFNULL function allows you to return an alternate value if an expression is NULL.
The syntax for the IFNULL function in MySQL is:
The value to test as NULL.
The value to return if expression is NULL.
The IFNULL function can be used in the following versions of MySQL:
Let's look at some MySQL IFNULL function examples and explore how to use the IFNULL function in MySQL.
For example: