FLOOR

2023-08-18 09:26:34  Updated

The FLOOR function returns the largest integer that is less than or equal to the numeric value of numeric_expression.

Syntax

FLOOR (numeric_expression)

Parameters

Parameter Description
numeric_expression The expression of the exact numeric data types or the approximate numeric data types: NUMBER, FLOAT, BINARY_FLOAT, and BINARY_DOUBLE.

Return type

The return type is the same as the data type of the numeric_expression parameter.

Examples

This example shows the results of using the FLOOR function for three different numbers.

Execute the following statement:

SELECT FLOOR(1.2), FLOOR(2), FLOOR(-12.1) FROM DUAL;

The following query result is returned:

+------------+----------+--------------+
| FLOOR(1.2) | FLOOR(2) | FLOOR(-12.1) |
+------------+----------+--------------+
|          1 |        2 |          -13 |
+------------+----------+--------------+

Contact Us