SQLServer数据库Isnull()CAST()函数实例讲解
程序员文章站
2022-08-11 10:54:21
SELECT isnull(Sum(CAST(DAY0 AS DECIMAL(8,2)) ),0) as DAYSALES from SMASTOREFORECASTINFO
I...
SELECT isnull(Sum(CAST(DAY0 AS DECIMAL(8,2)) ),0) as DAYSALES from SMASTOREFORECASTINFO
Isnull(): Sum(CAST(DAY0 AS DECIMAL(8,2)) )为NULL 时候 会把0赋值给DAYSALES
CAST():CAST(DAY0 AS DECIMAL(8,2)) 将每天的DAY0 值最多8位储存,2位小数
上一篇: c++四个强制转换实例讲解
下一篇: js正则匹配table tr