round, dround
Descriptionβ
Rounds a number to a specified number of digits.
- If
nis not specified,xis rounded to the nearest integer. - If
nis specified,xis rounded tondecimal places. Ifnis negative,xis rounded to the left of the decimal point. If overflow occurs, an error is returned.
Syntaxβ
ROUND(x [,n]);
Parametersβ
x: the number to be rounded. It supports the DOUBLE and DECIMAL128 data types.
n: the number of decimal places to round the number to. It supports the INT data type. This parameter is optional.