Name
round() — Round off numeric values
Common Usage
round(value) round(value,precision)
Description
The round() function returns a floating-point value
that represents
rounded to value
base-10 digits after the decimal point. The precision
parameter is assumed to be a floating-point value,
while value
is assumed to be a positive integer. Values are
rounded to the closest representation, not towards zero.precision
If either
or value
is NULL, a NULL will be returned. If precision
is omitted, it is assumed to be zero. This will
result in a whole number, although it will still be returned as
a floating-point value.precision
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access