totn Oracle Functions

Oracle / PLSQL: FLOOR Function

This Oracle tutorial explains how to use the Oracle/PLSQL FLOOR function with syntax and examples.

Description

The Oracle/PLSQL FLOOR function returns the largest integer value that is equal to or less than a number.

Syntax

The syntax for the FLOOR function in Oracle/PLSQL is:

FLOOR( number )

Parameters or Arguments

number
The value used to determine the largest integer value that is equal to or less than a number.

Returns

The FLOOR function returns an integer value.

Applies To

The FLOOR function can be used in the following versions of Oracle/PLSQL:

  • Oracle 12c, Oracle 11g, Oracle 10g, Oracle 9i, Oracle 8i

Example

Let's look at some Oracle FLOOR function examples and explore how to use the FLOOR function in Oracle/PLSQL.

For example:

FLOOR(5.9)
Result: 5

FLOOR(34.29)
Result: 34

FLOOR(-5.9)
Result: -6