日期:2014-05-19  浏览次数:20438 次

这样为什么不能不四舍五入?

SELECT   ROUND   (15375/100,   0)   as   a  
为什么不得到154

------解决方案--------------------
SELECT ROUND (15375.0/100, 0) as a

------解决方案--------------------
SELECT ROUND (15375*0.01, 0) as a

------解决方案--------------------
SELECT cast(ROUND (15375*1.0/100, 0) as int) as a
------解决方案--------------------
SELECT cast(ROUND (15375.0/100, 0) as int)as a

------解决方案--------------------
SELECT cast(ROUND (15375*1.0/100, 0) as int) as a