Rounds a value to the number of decimal places specified in the second parameter. : ROUND « Math Functions « SQL Server / T-SQL Tutorial






ROUND(number_to_round, number_ of_places,[0|1])

A numeric of anything but 0 will mean the number is truncated.
9>
10> SELECT ROUND(100.345678,5,0)
11> GO

-----------
 100.345680

(1 rows affected)
1> SELECT ROUND(100.345678,5,1)
2> GO

-----------
 100.345670

(1 rows affected)
1> SELECT ROUND(107.345678,-1,0)
2> GO

-----------
 110.000000

(1 rows affected)








11.18.ROUND
11.18.1.Rounds a value to the number of decimal places specified in the second parameter.
11.18.2.Rounding present value to two decimal places.
11.18.3.select ROUND(12.5,0)
11.18.4.select ROUND(12.4999,0)
11.18.5.select ROUND(12.4999,1)
11.18.6.select ROUND(12.4999,-1) (Minus)
11.18.7.select ROUND(12.5,0,1)
11.18.8.SELECT ROUND(3.22245, 3) RoundedNumber
11.18.9.ROUND(salary * 1.1, 2)