rohit poudel
rohit poudel

Reputation: 43

How to perform the SQL round off?

I want to perform the SQL round off on MS-SQL server .for Example 0.5 to 1,1.5 to 2,2.5 to 3.any help will be appreciated

Upvotes: 0

Views: 263

Answers (1)

Ullas
Ullas

Reputation: 11556

Use CEILING function.

select val,
ceiling(val) as Rounded
from tbl_name;

Read here about ceiling function

Fiddle demo here

Upvotes: 1

Related Questions