Oracle Number Function - Oracle/PLSQL FLOOR Function






Floor returns the integer below the number, regardless of whether positive or negative.

This Oracle tutorial explains how to use the Oracle/PLSQL FLOOR function.

Syntax

The syntax for the Oracle/PLSQL FLOOR function is:

FLOOR( number )

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

Example


SQL> select floor(1.1) from dual;
-- from ww w .  j  a v a 2 s .com
FLOOR(1.1)
----------
         1

SQL> select floor(1.9) from dual;

FLOOR(1.9)
----------
         1

SQL> select floor(-1.1) from dual;

FLOOR(-1.1)
-----------
         -2

SQL> select floor(-1.9) from dual;

FLOOR(-1.9)
-----------
         -2

SQL> select floor(0) from dual;

  FLOOR(0)
----------
         0

SQL>