All Products
Search
Document Center

FLOOR

Last Updated: Jun 18, 2021

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 |
+------------+----------+--------------+