.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

posted @ 2013-02-27 12:48  小站记忆  阅读(264)  评论(0)    收藏  举报