Billpeng Space

技术源自生活
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2012年8月27日

摘要: 1.round() 函数是四舍五入用,第一个参数是我们要被操作的数据,第二个参数是设置我们四舍五入之后小数点后显示几位。 2.numeric 函数的2个参数,第一个表示数据长度,第二个参数表示小数点后位数。 例如: select cast(round(12.5,2) as numeric(5,2)) 结果:12.50 select cast(round(12.555,2) as numeric(5,2)) 结果:12.56 select cast(round(122.5255,2) as numeric(5,2))结果:122.53 select cast(round(1222... 阅读全文

posted @ 2012-08-27 15:37 billpeng 阅读(142426) 评论(0) 推荐(3) 编辑