ROUND
Syntax
ROUND( number [ , precision ] )
Description
Rounds the number number
to the number of decimal digits specified in precision
.
If the number precision
is omitted, number
is rounded to the nearest integer.
Argument types:
number
—Fractional number | Integer
precision
—Integer
Return type: Depends on argument types
Examples
ROUND(3.14159) = 3
ROUND(3.14159, 3) = 3.142
Data source support
ClickHouse 21.8
, Files
, Google Sheets
, Microsoft SQL Server 2017 (14.0)
, MySQL 5.7
, Oracle Database 12c (12.1)
, PostgreSQL 9.3
, Yandex Documents
, YDB
.