This tutorial explains how to use the MySQL ISNULL function with syntax and examples.
The MySQL ISNULL function tests whether an expression is NULL.
The syntax for the ISNULL function in MySQL is:
ISNULL( expression )
The value to test if NULL.
The ISNULL function can be used in the following versions of MySQL:
Let's look at some MySQL ISNULL function examples and explore how to use the ISNULL function in MySQL.
For example:
mysql> SELECT ISNULL('AODBA.com');
Output: 0
mysql> SELECT ISNULL('');
Output: 0
mysql> SELECT ISNULL(NULL);
Output: 1
mysql> SELECT ISNULL(28);
Output: 0