SELECT CAST(960 AS NUMERIC(18,2)) -- it gives 960.00
SELECT CAST(178.5 AS NUMERIC(18,2)) -- it gives 178.50
我需要结果960和178.5,我怎么能这样做
答案 0 :(得分:0)
使用以下
SELECT CAST(960 AS NUMERIC(18,0)) -- it will give 960
SELECT CAST(178.5 AS NUMERIC(18,1)) -- it will give 178.5