First page Back Continue Last page Image

The IFNULL Statement

SELECT payment_date,

IFNULL(payment_date, 'No Payment') AS new_date

FROM invoices

IFNULL(test_expression, replacement_value)

NULL values present a specific problem when dealing with data, MySQL supports several commands to deal with NULL values, One of these is the IFNULL statement

An IFNULL can be wrapped around your query for valid data results, allowing your output to be easy to understand