Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
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,我该怎么做
在下面使用
SELECT CAST(960 AS NUMERIC(18,0)) -- it will give 960 SELECT CAST(178.5 AS NUMERIC(18,1)) -- it will give 178.5