MySQL round half
问题 Is it possible, in MySQL, to round half a specific way like PHP would do? PHP_ROUND_HALF_UP PHP_ROUND_HALF_DOWN PHP_ROUND_HALF_EVEN PHP_ROUND_HALF_ODD http://php.net/manual/fr/function.round.php Or are we really limited to only rounding up? 回答1: 1. From Oracle documentation: Based on MySQL official documentation, the rounding function act as the following: For exact-value numbers, ROUND() uses the “round half away from zero” or “round toward nearest” rule: A value with a fractional part of .5