FLOOR function in Oracle

FLOOR is one of the vital Numeric/Math functions of Oracle. It is used to get the smallest integer value which is either less than or equal to the mentioned number. The FLOOR function is supported in the various versions of the Oracle/PLSQL, including, Oracle 12c, Oracle 11g, Oracle 10g, Oracle 9i and Oracle 8i.

Syntax:

FLOOR( number )

Parameters: number: It is used to specify the number whose integer value is to be found.

Example 1:

FLOOR(11.11)

Output:

11

Explanation: Since the number itself is not an integer, thus the smallest integer just smaller than 11.11 is 12.

Example 2:

FLOOR(-11.11)

Output:

-12

Explanation: Since the number itself is not an integer, thus the smallest integer just smaller than -11.11 is -12.

Example 3:

FLOOR(11)

Output:

11

Explanation: Since the number itself is an integer, thus the result is the number itself.

Please follow and like us:
Content Protection by DMCA.com