SQL Server FLOOR() Function
Example
Return the largest integer value that is equal to or less than 25.75:
SELECT FLOOR(25.75) AS FloorValue;
Try it Yourself »
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;
Try it Yourself »
Example
Return the largest integer value that is equal to or less than -13.5:
SELECT FLOOR(-13.5) AS FloorValue;
Try it Yourself »
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.