MySQL SQL

MySQL Null Functions

Handle NULL values in expressions.

SELECT name, IFNULL(discount, 0) AS discount
FROM products;

Common tools include IFNULL(), COALESCE(), and NULLIF(). Choose a replacement value that matches the column's meaning.