标签: sql-server rounding numeric
我想在MS-SQL服务器上执行SQL舍入。例如0.5到1,1.5到2,2.5到3.Yan帮助将不胜感激
答案 0 :(得分:1)
使用CEILING功能。
CEILING
select val, ceiling(val) as Rounded from tbl_name;
Read here about ceiling function
ceiling
Fiddle demo here