- ceil (x) / ceiling(x) 向上取整
ex: ceil(1.2) = 2
- floor (x) 向下取整
ex: floor(1.2) = 1
- round(x) / round(x,n) 指定精度四舍五入
ex: round(1.5) = 2 round(1.5,3) = 1.500
- 指定精度进行数据截取
- mysql:truncate(x,n)
- oracle: trunc(x,n)
ex: truncate(1.2,0) = 1 truncate(1.2,3) = 1.200
网友评论