Returns the value of the specified number, rounded to the specified number of decimal places.
round(number, decimal_places)
select round(123.4545, 2)
---------- 123.4500
select round(123.45, -2)
---------- 100.00
select round(1.2345E2, 2)
----------------- 123.450000
select round(1.2345E2, -2)
----------------- 100.000000
round, a mathematical function, rounds the number so that it has decimal_places significant digits.
A positive value for decimal_places determines the number of significant digits to the right of the decimal point; a negative value for decimal_places determines the number of significant digits to the left of the decimal point.
Results are of the same type as number and, for numeric and decimal expressions, have an internal precision equal to the precision of the first argument plus 1 and a scale equal to that of number.
select round(55.55, -3)
See also Transact-SQL Users Guide.
ANSI SQL – Compliance level: Transact-SQL extension.
Any user can execute round.