//如果 check_expression 不为 NULL,那么返回该表达式的值;否则返回 replacement_value
ISNULL ( check_expression , replacement_value )
实例一 (用值 $10.00 替换 titles 表的 price 列中的所有 NULL 条目。)
GO
SELECT AVG(ISNULL(price, $10.00))
FROM titles
GO
实例二
GO
SELECT SUBSTRING(title, 1, 15) AS Title, type AS Type,
ISNULL(price, 0.00) AS Price
FROM titles
GO