I have a salary table with this column
EMPLOYEE_NAME SALARY
------------------------
ANNA 113750
MARRY 124300
BELLA 105100
<
Unlike ROUND
(which rounds up and down) the CELING
function (which you want to round up) has no length parameter (as in ROUND(salary, -3)
). So divide and multiply to get the desired result:
select employee_name, ceiling(salary / 1000.0) * 1000.0 as salary
from mytable;
CEILING
is documented here: https://msdn.microsoft.com/de-de/library/ms189818.aspxROUND
is documented here: https://msdn.microsoft.com/de-de/library/ms175003.aspx