Oracle PL/SQL CEIL function example
摘要: The CEIL function round the specified number up, and return the smallest number that is greater than or equal to the specified number.
The CEIL function round the specified number up, and return the smallest number that is greater than or equal to the specified number.
CEIL function examples
SELECT CEIL(1.2) FROM DUAL; -- output : 2 SELECT CEIL(1.5) FROM DUAL; -- output : 2 SELECT CEIL(1.7) FROM DUAL; -- output : 2 SELECT CEIL(1.99) FROM DUAL; -- output : 2 SELECT CEIL(-1.2) FROM DUAL; -- output : -1 SELECT CEIL(-1.5) FROM DUAL; -- output : -1 SELECT CEIL(-1.7) FROM DUAL; -- output : -1 SELECT CEIL(-1.99) FROM DUAL; -- output : -1 SELECT CEIL(15.1) FROM DUAL; -- output : 16 SELECT CEIL(99.001) FROM DUAL; -- output : 100 SELECT CEIL(-1.5) FROM DUAL; -- output : -1 SELECT CEIL(-0.9) FROM DUAL; -- output : 0
References