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.

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

  1. CEIL Function :- Oracle official docs

About the Author

author image
Dhaval Dadhaniya
Dhaval Dadhaniya is a software engineer by profession and reader/writter by passion. He is working in a well reputed MNC as an applications Developer with 5 years of experience. He have good understanding and knowledge of Java, Database, Spring, Hibernate and exploring other technologies related to Software development. Befriend him on Facebook

Comments

Leave a Reply

avatar