CEIL Function in Oracle SQL – PLSQL

The CEIL function in Oracle SQL / PLSQL is used to get a smallest integer number which is greater than or equal to the number passed to the function.

Syntax for the CEIL function in Oracle SQL / PLSQL is:

SELECT CEIL(N)
FROM table_name;

  • N is the number passed

Example 1:

SELECT CEIL(1.23456)
FROM DUAL;

Will return “2”


Example 2:

SELECT CEIL(2.2)
FROM DUAL;

Will return “3”


Example 3:

SELECT CEIL(2.051)
FROM DUAL;

Will return “3”


Example 4:

SELECT CEIL(-2.051)
FROM DUAL; 

Will return “-2”


Tagged , , , , , , , , , , , . Bookmark the permalink.