Outdated Version
You are viewing an older version of this section. View current production version.
ROUND
Rounds a number to the given precision.
Syntax
ROUND ( expression, precision )
Arguments
- expression: any valid numeric expression.
- precision: the number of digits after the decimal to round to.
Return Type
Float or double.
Examples
select round(3.14159, 0), round(3.14159, 2);
+-------------------+-------------------+
| round(3.14159, 0) | round(3.14159, 2) |
+-------------------+-------------------+
| 3 | 3.14 |
+-------------------+-------------------+