FLOOR Function in SQL

The FLOOR function takes a numeric value—usually a decimal or floating-point number—and returns the largest integer that is less than or equal to that value.

SQL Syntax

FLOOR(number)

Example: Let’s specify the Positive number.

SQL

SELECT FLOOR(7.14);

The output of the above code is 7.

Example: Let’s specify the Negative number.

SQL

SELECT FLOOR(-7.14);

The output of the above code is -8.