标签:round sql mysq mysql bsp div 四舍五入 pre 小数
ROUND(x,y) 用于对 x 进行四舍五入,并保留小数点后 y 位
mysql> SELECT ROUND(1.38,1), ROUND(1.38,0), ROUND(232.38,-1), ROUND(232.38,-2); +---------------+---------------+------------------+------------------+ | ROUND(1.38,1) | ROUND(1.38,0) | ROUND(232.38,-1) | ROUND(232.38,-2) | +---------------+---------------+------------------+------------------+ | 1.4 | 1 | 230 | 200 | +---------------+---------------+------------------+------------------+
标签:round sql mysq mysql bsp div 四舍五入 pre 小数
原文地址:http://www.cnblogs.com/pzk7788/p/6891775.html