sql replace value with null code example
Example: replace null with 0 in sql
SELECT IFNULL(Price, 0) FROM Products;
SELECT COALESCE(Price, 0) FROM Products;
-- Oracle (extra):
SELECT NVL(Price, 0) FROM Products;
SELECT IFNULL(Price, 0) FROM Products;
SELECT COALESCE(Price, 0) FROM Products;
-- Oracle (extra):
SELECT NVL(Price, 0) FROM Products;