PostgreSQL FLOOR Function

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

PostgreSQL FLOOR() function

FLOOR() function

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

Syntax :

floor()

PostgreSQL Version : 9.3

Pictorial presentation of FLOOR() Function

 

Example : PostgreSQL FLOOR() function

SELECT FLOOR(53.6) AS "Floor";

Output :

 Floor
-------
    53
(1 row)

Example : PostgreSQL FLOOR() function using negative value

SELECT FLOOR(-53.6) AS "Floor";

Output :

 Floor
-------
   -54
(1 row)