THE WORLD'S LARGEST WEB DEVELOPER SITE

SQL Server FLOOR() Function

❮ SQL Server Functions

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 (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 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 »

❮ SQL Server Functions