# Rounding of to nearest 10 rupee in SQL Server [closed]

I want round the amount to nearest rupee.

I.e. if I got 225 as amount it must be treat as 230.

And if 224 it must treat as 220.

How can it be done using `roundoff` in T-SQL?

-

## closed as off topic by Nick Chammas, Aaron Bertrand♦, Mark Storey-Smith, Martin Smith, MarianJun 24 '12 at 14:54

Questions on Database Administrators Stack Exchange are expected to relate to database administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

WHat datatype are these values? –  ypercube Jun 23 '12 at 8:24
datatype used is numeric(19,6) –  Sivajith Jun 23 '12 at 8:33
Have you read this?: ROUND() function. –  ypercube Jun 23 '12 at 8:36
This part: `When length is a **negative** number, numeric_expression is rounded on the left side of the decimal point, as specified by length.` –  ypercube Jun 23 '12 at 8:45
Dude, just read the link ypercube sent you. He even highlighted the relevant part for you. Put some effort into answering your own question now that we've practically led you to its doorstep. –  Nick Chammas Jun 23 '12 at 15:52

You can use the `Round()` function.

Eg:

``````Select Round(224,-1)
``````

it returns the value `220`

``````Select Round(225,-1)
``````

it returns the value `230`

-

As the comments have stated you can use the ROUND() function

``````create table t
(
rupee money
)

insert into t values (225)
insert into t values (224)
insert into t values (221)
insert into t values (226)
insert into t values (231)

select round(rupee, -1)
from t
``````
-