ISNULL(), SQL Server function returns an alternative value when an expression is NULL.
Syntax of ISNULL() in SQL-
ISNULL(<column_name>,<alternative_value>)
Example of ISNULL() in SQL Server query-
SELECT ProductName,
(UnitsInStock + ISNULL(UnitsOnOrder,0)
FROM Products;
โIt will return an alternative value โ0โ when an expression is NULL
Leave a Reply