SQL Server FLOOR() Function
Example
Return the largest integer value that is equal to or less than a number:
SELECT FLOOR(25.75) AS FloorValue;
Try it Yourself »
Definition and Usage
The FLOOR() function returns the largest integer value that is equal to or less than the specified number.
Tip: See also the CEILING() and ROUND() functions.
Syntax
FLOOR(number)
Parameter Values
Parameter | Description |
---|---|
number | Required. A numeric value |
Technical Details
Works in: | SQL Server 2014, SQL Server 2012, SQL Server 2008 R2, SQL Server 2008, SQL Server 2005 |
---|
More Examples
Example
Return the largest integer value that is equal to or less than a number:
SELECT FLOOR(25) AS FloorValue;
Try it Yourself »
Example
Return the largest integer value that is equal to or less than a number:
SELECT FLOOR(-13.5) AS FloorValue;
Try it Yourself »