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!

2 answers

  • answered 2018-11-08 08:13 Maheshkumar Mayilsamy

    use ceiling function as below


  • answered 2018-11-08 08:17 yusuf hayırsever

    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(512.24, -3),Result=1000,

    ROUND(123.9994, 3), Result=123.999,

    ROUND(123.4545, 2), Result=123.45