如何在MySQL中四舍五入到最接近的整数?
问题描述:
如何在MySQL中四舍五入到最接近的整数?
How would I round down to the nearest integer in MySQL?
示例:12345.7344 rounds to 12345
mysql的round()
函数四舍五入.
mysql's round()
function rounds up.
我不知道值和小数位将是多长时间,可能是10位数字和4位小数,可能是2位数字和7位小数.
I don't know how long the values nor the decimal places will be, could be 10 digits with 4 decimal places, could be 2 digits with 7 decimal places.