ISNULL()函数的基本用法:ISNULL(expression, value)
使用ISNULL()函数进行条件判断:
SELECT column1, column2, ISNULL(column3, ‘N/A’) AS column3
FROM table_name
SELECT column1, column2, ISNULL(column3, 0) + ISNULL(column4, 0) AS total
FROM table_name
SELECT column1, column2, ISNULL(column3, ‘’) + ISNULL(column4, ‘’) AS full_name
FROM table_name
SELECT column1, column2, ISNULL(column3, GETDATE()) AS date
FROM table_name
辰迅云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>
推荐阅读: python中isnull函数怎么使用