SQL FLOOR() Function
SQL FLOOR() Function return largest integer round value that is equal to or less then to a parameter value.
Another way we can say last round value that value return of the function.
Supported Oracle SQL Version
- Oracle 8i
- Oracle 9i
- Oracle 10g
- Oracle 11g
- Oracle 12c
- Oracle 18c
Example
Consider following example that return largest integer round value that is equal to or less then to a number.
SQL> SELECT FLOOR(6.5) "FLOOR(6.5)" FROM DUAL;
FLOOR(6.5)
----------
6
Example Explanation
- we are pass into FLOOR(6.5) function.
- Function find all smallest round value (6, 5, 4, ... 0) from 6.5.
- Now largest integer value (6) that is equal to or less then to a number (6.5).
- Finally function return 6 value.