首页 > 解决方案 > SQL how to round up to tenth (no decimals)

问题描述

In Excel I use the ceiling function to round up to the tenth (or more) of a number, like for example:

38.4 =CEILING(A1,10), becomes 40

21 would become 30 etcetc..

In SQl you have a ceiling function but this only seems to round up decimals. Can I use this function or is there are different function I can use?

Thnx in advance!

标签: sql

解决方案


使用天花板功能如下

CEILING(38.4/10)*10

推荐阅读