SQL实现小数取整

1、round()遵循四舍五入把原值转化为指定小数位数。
如:round(1.45,0) = 1;round(1.55,0)=2
2、floor()向下舍入为指定小数位数.
如:floor(1.45,0)= 1;floor(1.55,0) = 1
3、ceiling()向上舍入为指定小数位数.
如:ceiling(1.45,0) = 2;ceiling(1.55,0)=2

posted @ 2019-07-24 16:31  Bill-Lee  阅读(9136)  评论(0编辑  收藏  举报