bugl
bugl
HomeLearnPatternsSearch
HomeLearnPatternsSearch

Loading lesson path

Learn/SQL/SQL References
SQL•SQL References

SQL Server FLOOR() Function

Concept visual

SQL Server FLOOR() Function

Pointer walk
two pointers
leftright102132436485116
left=0
right=6
1
3

Start at both ends

Example

Return the largest integer value that is equal to or less than 25.75:

SELECT FLOOR(25.75) AS FloorValue;

Definition and Usage

The FLOOR() function returns the largest integer value that is smaller than or equal to a number.

Tip:

Also look at the CEILING()

and

Round()

functions.

Syntax

Floor(

number )

Parameter Values

Parameter

Description number

Required. A numeric value

Technical Details

Works in:

SQL Server (starting with 2008), Azure SQL Data Warehouse, Parallel Data

Warehouse

More Examples

Example

Return the largest integer value that is equal to or less than 25:

SELECT FLOOR(25) AS FloorValue;

Example

Formula

Return the largest integer value that is equal to or less than - 13.5:
SELECT FLOOR(-13.5) AS FloorValue;

Previous

❮ SQL Server Functions

Next

Previous

SQL Server EXP() Function

Next

SQL Server LOG() Function