IFNULL() in MySQL — How It Works
What the MySQL IFNULL() function does, with an example.
Published October 21, 2026
IFNULL() returns an alternative value if the given expression is NULL.
Key points
- Part of standard SQL functions available in MySQL for working with query results
Example
SELECT IFNULL(phone, 'No phone on file') FROM users;