Curriculum
Course: SQL
Login

Curriculum

SQL

SQL References

0/80

MySQL Functions

0/139

SQL Server Functions

0/84

SQL Quick Ref

0/1
Text lesson

FLOOR

Example

Return the greatest whole number that is less than or equal to 25.75.

SELECT FLOOR(25.75AS FloorValue;

Definition and Usage

The FLOOR() function yields the highest integer less than or equal to a number.

Tip: Consider the CEILING() and ROUND() functions for related functionality.

Syntax

FLOOR(number)

Parameter Values

Parameter

Description

number

Required: A numerical value.

Technical Details

Works in:

SQL Server (from 2008 onwards), Azure SQL Data Warehouse, and Parallel Data Warehouse

More Examples

Example

Provide the greatest integer value that is equal to or less than 25.

SELECT FLOOR(25AS FloorValue;

Example

Provide the greatest integer value that is equal to or less than -13.5.

SELECT FLOOR(-13.5AS FloorValue;