FLOOR Function in Oracle SQL – PLSQL

0 Flares Filament.io 0 Flares ×

The FLOOR function in Oracle SQL / PLSQL is used to get a largest integer number which is less than or equal to the number passed to the function.

Syntax for the FLOOR function in Oracle SQL / PLSQL is:

SELECT FLOOR(N)
FROM table_name;

  • N is the number passed

Example 1:

SELECT FLOOR(1.23456)
FROM DUAL;

Will return “1”


Example 2:

SELECT FLOOR(2.2)
FROM DUAL;

Will return “2”


Example 3:

SELECT FLOOR(2.051)
FROM DUAL;

Will return “2”


Example 4:

SELECT FLOOR(-2.051)
FROM DUAL;

Will return “-3”


Tagged , , , , , , , , , , , . Bookmark the permalink.