This is an old revision of the document!
The $ROUND function returns a numeric expression rounded to a specified number of decimal places.
If the value specified by n is positive and longer than the digits after the decimal point, 0 is added after the fraction digits.
If the value specified by n is negative and larger than or equal to the digits before the decimal point, 0.00 is returned.
$ROUND(expression [, n])
Required. A valid numerical value. This can be a column in a select statement that will return a numerical value.
Optional. n is an integer indicating the number of digits to the right of the decimal. The default is 0.
$ROUND(123.4545, 2) result: 123.4500
$ROUND(123.4545, -2) result: 100.0000
$ROUND(123.9994, 3) result: 123.9990
$ROUND(123.9995, 3) result: 124.0000