SQL Round Function

前端 未结 7 1333
有刺的猬
有刺的猬 2021-01-13 10:00

round(45.923,-1) gives a result of 50. Why is this? How it is calculated?

(sorry guys i was mistaken with earlier version of this question suggestin

7条回答
  •  南方客
    南方客 (楼主)
    2021-01-13 10:28

    It doesn't for me on MySQL:

    mysql> select round(45.923,-1);
    +------------------+
    | round(45.923,-1) |
    +------------------+
    |               50 |
    +------------------+
    1 row in set (0.00 sec)
    

提交回复
热议问题