MySQL numeric processing function floor and round in MySQL, when working with numeric values, a numeric processing function is used, such as having a float value of 2.13, and you want to use the following function floor and round as long as the integer 2. Floor: The function returns only the integer part, and the fractional part is discarded. Round: Function rounding, part rounding greater than 0.5, discarding if not. different from floor. The following test mysql> Select Floor (5.1); +------------+| Floor (5.1) |+------------+| 5 |+------------+1 row in Set (0.00 sec) mysql> Select floor (5.5); +------------+| Floor (5.5) |+------------+| 5 |+------------+1 row in Set (0.00 sec) www.2cto.com mysql> select round (5.2); +------------+| Round (5.2) |+------------+| 5 |+------------+1 row in Set (0.00 sec) mysql> Select round (5.5); +------------+| Round (5.5) |+------------+| 6 |+------------+1 row in Set (0.00 sec) http://www.2cto.com/database/201208/151370.html
MySQL rounding, decimal processing function floor (), round ()