SELECT IFNULL(Price, 0) FROM Products;
SELECT COALESCE(Price, 0) FROM Products;
-- Oracle (extra):
SELECT NVL(Price, 0) FROM Products;
--See records where specific column is NULL
SELECT * from table1 WHERE column1 IS NULL
--Update all the NULL values in the selected column
UPDATE table1 SET column1 = replace_value WHERE column1 IS NULL
CASE WHEN ColumnName IS NULL THEN 'anyText'
ELSE ColumnName END
---------EXAMPLE --------------------------
SELECT E.Name as Employee, CASE WHEN M.Name IS NULL THEN 'No Manager'
ELSE M.Name END as Manager
FROM tblEmployee E
LEFT JOIN tblEmployee M
ON E.ManagerID = M.EmployeeID
--See records where specific column is NULL
SELECT * from table1 WHERE column1 ISNULL
--Update all the NULL values in the selected column
UPDATE table1 SET column1 = replace_value WHERE column1 ISNULL
select coalesce(col1, col2) from t;