w3resource

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

postgresql floor function

Pictorial presentation of PostgreSQL FLOOR() function

pictorial presentation of PostgreSQL FLOOR() function

Example: PostgreSQL FLOOR() function

Code:

SELECT FLOOR(53.6) AS "Floor";

Sample Output:

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

Example: PostgreSQL FLOOR() function using negative value

Code:

SELECT FLOOR(-53.6) AS "Floor";

Sample Output:

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

Previous: EXP function
Next: LN function



Become a Patron!

Follow us on Facebook and Twitter for latest update.

It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.

https://w3resource.com/PostgreSQL/floor-function.php