.NET与 MSSQL 除法小数点问题
(1)
Math.Round()
decimal result = Math.Round((decimal)x/ y,2); 后面的2表示保留小数点后2位小数
(2)
select   cast(cast(10 as float)/3 as decimal(10,2)) as prirnt
--3.33
(1)
Math.Round()
decimal result = Math.Round((decimal)x/ y,2); 后面的2表示保留小数点后2位小数
(2)
select   cast(cast(10 as float)/3 as decimal(10,2)) as prirnt
--3.33
