How to SELECT round up number in SQL Server

前端 未结 5 1861
南方客
南方客 2021-01-25 08:44

I have a salary table with this column

EMPLOYEE_NAME    SALARY
------------------------
ANNA             113750
MARRY            124300
BELLA            105100
<         


        
5条回答
  •  情歌与酒
    2021-01-25 09:07

    Try below CEILING method :

      DECLARE @fraction MONEY = 1000
    
       SELECT CEILING(113750/@fraction)*@fraction 
       SELECT CEILING(124300/@fraction)*@fraction
       SELECT CEILING(105100/@fraction)*@fraction 
    

提交回复
热议问题