w3resource

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

pictorial presentation of PostgreSQL CEILING() function

Example: PostgreSQL CEILING() function

Code:

SELECT CEILING(69.4) AS "Ceiling";

Sample Output:

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

Example: PostgreSQL CEILING() function using negative value

Code:

SELECT CEILING(-69.8) AS "Ceiling";

Sample Output:

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

Previous: CEIL function
Next: COS function



Follow us on Facebook and Twitter for latest update.