PostgreSQL CEIL Function

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

PostgreSQL CEIL() function

CEIL() function

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

Syntax :

ceil()

PostgreSQL Version : 9.3

Pictorial presentation of PostgreSQL CEIL() function

 

Example : PostgreSQL CEIL() function

SELECT CEIL(53.7) AS "Ceil";

Output :

 Ceil
------
   54
(1 row)

Example : PostgreSQL CEIL() function with negative value

SELECT CEIL(-53.7) AS "Ceil";

Output :

 Ceil
------
  -53
(1 row)