Skip to content

Commit 2c86520

Browse files
committed
Edit pass
1 parent ed408fb commit 2c86520

2 files changed

Lines changed: 71 additions & 72 deletions

File tree

docs/t-sql/functions/ceiling-transact-sql.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
22
title: "CEILING (Transact-SQL)"
3-
description: CEILING returns the smallest integer greater than, or equal to, the specified numeric expression.
3+
description: CEILING returns the smallest integer greater than or equal to the specified numeric expression.
44
author: markingmyname
55
ms.author: maghan
66
ms.reviewer: randolphwest
7-
ms.date: 05/18/2024
7+
ms.date: 11/21/2025
88
ms.service: sql
99
ms.subservice: t-sql
1010
ms.topic: reference
@@ -56,23 +56,27 @@ The return type depends on the input type of *numeric_expression*:
5656

5757
If the result doesn't fit in the return type, an arithmetic overflow error occurs.
5858

59+
For more information, see [Precision, scale, and length](../data-types/precision-scale-and-length-transact-sql.md).
60+
5961
## Examples
6062

6163
This example shows positive numeric, negative numeric, and zero value inputs for the `CEILING` function.
6264

6365
```sql
64-
SELECT CEILING($123.45), CEILING($-123.45), CEILING($0.0);
65-
GO
66+
SELECT CEILING($123.45),
67+
CEILING($-123.45),
68+
CEILING($0.0);
6669
```
6770

68-
[!INCLUDE [ssResult](../../includes/ssresult-md.md)]
71+
The result is the integer part of the calculated value in the same data type as *numeric_expression*.
6972

7073
```output
71-
--------- --------- -------------------------
72-
124.00 -123.00 0.00
74+
------- -------- -----
75+
124.00 -123.00 0.00
7376
```
7477

7578
## Related content
7679

77-
- [System Functions (Transact-SQL)](../../relational-databases/system-functions/system-functions-category-transact-sql.md)
78-
80+
- [FLOOR (Transact-SQL)](floor-transact-sql.md)
81+
- [System functions by category for Transact-SQL](../../relational-databases/system-functions/system-functions-category-transact-sql.md)
82+
- [Mathematical functions (Transact-SQL)](mathematical-functions-transact-sql.md)
Lines changed: 58 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
---
22
title: "FLOOR (Transact-SQL)"
3-
description: "FLOOR (Transact-SQL)"
3+
description: FLOOR returns the largest integer less than or equal to the specified numeric expression.
44
author: markingmyname
55
ms.author: maghan
6-
ms.date: "03/03/2017"
6+
ms.reviewer: randolphwest
7+
ms.date: 11/21/2025
78
ms.service: sql
89
ms.subservice: t-sql
910
ms.topic: reference
@@ -16,70 +17,64 @@ helpviewer_keywords:
1617
- "FLOOR function [Transact-SQL]"
1718
dev_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+
3944
The 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(*p*, 0)**|
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

Comments
 (0)