PostgreSQL CEILING Function

Education is not limited to just classrooms. It can be gained anytime, anywhere... - Ravi Ranjan (M.Tech-NIT)

PostgreSQL CEILING() function

CEILING() function

The PostgreSQL ceiling() is used to return the value after rounded up any positive or negative decimal value as greater than the argument.

Syntax :

ceiling()

PostgreSQL Version : 9.3

Pictorial presentation of PostgreSQL CEILING() function

Example : PostgreSQL CEILING() function

SELECT CEILING(69.4) AS "Ceiling";

Output :

 Ceiling
---------
      70
(1 row)

Example : PostgreSQL CEILING() function using negative value

SELECT CEILING(-69.8) AS "Ceiling";

Output :

 Ceiling
---------
     -69
(1 row)