This SQLite post explains how to use the SQLite ifnull function with syntax and examples.
The SQLite ifnull function allows you to return an alternate value if expression1 is NULL. In other words, it will return the first non-null expression which is the same as using the coalesce function with 2 parameters.
The syntax for the ifnull function in SQLite is:
Two values passed in where the first non-null value will be returned.
The ifnull function can be used in the following versions of SQLite:
Let's look at some SQLite ifnull function examples and explore how to use the ifnull function in SQLite.
For example: