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!
use ceiling function as below
I will give you some examples and I think you will understand.
ROUND(512.24, -1) Result=510,
ROUND(512.24, -2) Result=500,
ROUND(123.9994, 3), Result=123.999,
ROUND(123.4545, 2), Result=123.45