怎样保留小数点后两位..如果是10.00也要保留??在线等
------解决方案--------------------
SELECT cast(ROUND(123.4545, 2) as decimal(10,2))
--结果:123.45
SELECT cast(ROUND(123.4500, 2) as decimal(10,2))
--结果:123.45
SELECT cast(ROUND(123.00, 2) as decimal(10,2))
--结果:123.00
SELECT cast(ROUND(123, 2) as decimal(10,2))
--结果:123.00
楼主看看:)