ROUND Function in SQL Server 2008 Function

In this article i described ROUND function in SQL Server 2008.
  • 3070


ROUND Function rounds the given expression to a specific length. It is one of the MATH function available in SQL Server. Basic syntax for using ROUND function is given by:


ROUND (numeric_expression, length)


numeric_expression- It is the expression which is to be rounded off.

length- It defines the length up to which the numeric_expression is to be rounded off.


Lets take some values and find result after applying ROUND function on them.

select 6 as value, ROUND(6,1) as AfterRoundedOff
select -14 as value, ROUND(-14,1) as AfterRoundedOff
select 12.05 as value, ROUND(12.05,1)as AfterRoundedOff
select 12.05 as value, ROUND(12.05,2)as AfterRoundedOff
select 0.3457653 as value, ROUND(0.3457653,1)as AfterRoundedOff

Now select whole code and press F5 to execute queries.




More Articles

© 2020 DotNetHeaven. All rights reserved.