11---
22title : " FLOOR (Transact-SQL)"
3- description : " FLOOR (Transact-SQL) "
3+ description : FLOOR returns the largest integer less than or equal to the specified numeric expression.
44author : markingmyname
55ms.author : maghan
6- ms.date : " 03/03/2017"
6+ ms.reviewer : randolphwest
7+ ms.date : 11/21/2025
78ms.service : sql
89ms.subservice : t-sql
910ms.topic : reference
@@ -16,70 +17,64 @@ helpviewer_keywords:
1617 - " FLOOR function [Transact-SQL]"
1718dev_langs :
1819 - " TSQL"
19- monikerRange : " >= aps-pdw-2016 || = azure-sqldw-latest || >= sql-server-2016 || >= sql-server-linux-2017 || = azuresqldb-mi-current|| =fabric"
20+ monikerRange : " >=aps-pdw-2016 || =azuresqldb-current || = azure-sqldw-latest || >=sql-server-2016 || >=sql-server-linux-2017 || =azuresqldb-mi-current || =fabric || =fabric-sqldb "
2021---
2122# FLOOR (Transact-SQL)
22- [ !INCLUDE [ sql-asdb-asdbmi-asa-pdw-fabricse-fabricdw] ( ../../includes/applies-to-version/sql-asdb-asdbmi-asa-pdw-fabricse-fabricdw.md )]
23-
24- Returns the largest integer less than or equal to the specified numeric expression.
25-
26- :::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: [ Transact-SQL syntax conventions] ( ../../t-sql/language-elements/transact-sql-syntax-conventions-transact-sql.md )
27-
28- ## Syntax
29-
23+
24+ [ !INCLUDE [ sql-asdb-asdbmi-asa-pdw-fabricse-fabricdw-fabricsqldb] ( ../../includes/applies-to-version/sql-asdb-asdbmi-asa-pdw-fabricse-fabricdw-fabricsqldb.md )]
25+
26+ Returns the largest integer less than or equal to the specified numeric expression.
27+
28+ :::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: [ Transact-SQL syntax conventions] ( ../../t-sql/language-elements/transact-sql-syntax-conventions-transact-sql.md )
29+
30+ ## Syntax
31+
3032``` syntaxsql
31- FLOOR ( numeric_expression )
32- ```
33-
33+ FLOOR ( numeric_expression )
34+ ```
35+
3436## Arguments
35- * numeric_expression*
36- Is an expression of the exact numeric or approximate numeric data type category.
37-
38- ## Return Types
37+
38+ #### * numeric_expression*
39+
40+ An [ expression] ( ../language-elements/expressions-transact-sql.md ) of the exact numeric or approximate numeric data type category.
41+
42+ ## Return types
43+
3944The return type depends on the input type of * numeric_expression* :
40-
41- | Input type| Return type|
42- | ----------| -----------|
43- | ** float** , ** real** | ** float** |
44- | ** decimal(* p* , * s* )** | ** decimal(38, * s* )** |
45- | ** int** , ** smallint** , ** tinyint** | ** int** |
46- | ** bigint** | ** bigint** |
47- | ** money** , ** smallmoney** | ** money** |
48- | ** bit** | ** float** |
49-
50- If the result does not fit in the return type, an arithmetic overflow error occurs.
51-
52- ## Examples
53- The following example shows positive numeric, negative numeric, and currency values with the ` FLOOR ` function.
54-
55- ``` sql
56- SELECT FLOOR(123 .45 ), FLOOR(- 123 .45 ), FLOOR($123 .45 );
57- ```
58-
59- The result is the integer part of the calculated value in the same data type as * numeric_expression* .
60-
61- ```
62- --------- --------- -----------
63- 123 -124 123.0000
64- ```
65-
66- ## Examples: [ !INCLUDE[ ssazuresynapse-md] ( ../../includes/ssazuresynapse-md.md )] and [ !INCLUDE[ ssPDW] ( ../../includes/sspdw-md.md )]
67- The following example shows positive numeric, negative numeric, and values with the ` FLOOR ` function.
68-
69- ``` sql
70- SELECT FLOOR(123 .45 ), FLOOR(- 123 .45 ), FLOOR($123 .45 );
71- ```
72-
73- The result is the integer part of the calculated value in the same data type as * numeric_expression* .
74-
75- ```
76- ----- --------- -----------
77-
78- 123 -124 123
79- ```
80-
81- ## See Also
82- [ Mathematical Functions ( ; Transact-SQL) ; ] ( ../../t-sql/functions/mathematical-functions-transact-sql.md )
83-
84-
8545
46+ | Input type | Return type |
47+ | --- | --- |
48+ | ** float** , ** real** | ** float** |
49+ | ** decimal(* p* , * s* )** | ** decimal(* p* , 0)** |
50+ | ** int** , ** smallint** , ** tinyint** | ** int** |
51+ | ** bigint** | ** bigint** |
52+ | ** money** , ** smallmoney** | ** money** |
53+ | ** bit** | ** float** |
54+
55+ If the result doesn't fit in the return type, an arithmetic overflow error occurs.
56+
57+ For more information, see [ Precision, scale, and length] ( ../data-types/precision-scale-and-length-transact-sql.md ) .
58+
59+ ## Examples
60+
61+ The following example shows positive numeric, negative numeric, and currency values with the ` FLOOR ` function.
62+
63+ ``` sql
64+ SELECT FLOOR(123 .45 ),
65+ FLOOR(- 123 .45 ),
66+ FLOOR($123 .45 );
67+ ```
68+
69+ The result is the integer part of the calculated value in the same data type as * numeric_expression* .
70+
71+ ``` output
72+ ---- ----- -------
73+ 123 -124 123.00
74+ ```
75+
76+ ## Related content
77+
78+ - [ CEILING (Transact-SQL)] ( ceiling-transact-sql.md )
79+ - [ System functions by category for Transact-SQL] ( ../../relational-databases/system-functions/system-functions-category-transact-sql.md )
80+ - [ Mathematical functions (Transact-SQL)] ( mathematical-functions-transact-sql.md )
0 commit comments