Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Commit c570038

Browse files
committed
Refresh mathematical functions article (UUF 354568)
1 parent 4cf542e commit c570038

2 files changed

Lines changed: 79 additions & 78 deletions

File tree

Lines changed: 56 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,56 @@
1-
---
2-
title: "Mathematical Functions (Transact-SQL)"
3-
description: "Mathematical Functions (Transact-SQL)"
4-
author: markingmyname
5-
ms.author: maghan
6-
ms.date: "07/06/2017"
7-
ms.service: sql
8-
ms.subservice: t-sql
9-
ms.topic: reference
10-
helpviewer_keywords:
11-
- "calculations [SQL Server]"
12-
- "mathematical functions [SQL Server]"
13-
- "functions [SQL Server], mathematical"
14-
dev_langs:
15-
- "TSQL"
16-
monikerRange: "= azuresqldb-current || = azuresqldb-mi-current || >= sql-server-2016 || >= sql-server-linux-2017 || = azuresqledge-current || = azure-sqldw-latest || >= aps-pdw-2016||=fabric"
17-
---
18-
# Mathematical Functions (Transact-SQL)
19-
[!INCLUDE [sql-asdb-asdbmi-asa-pdw-fabricse-fabricdw](../../includes/applies-to-version/sql-asdb-asdbmi-asa-pdw-fabricse-fabricdw.md)]
20-
21-
The following scalar functions perform a calculation, usually based on input values that are provided as arguments, and return a numeric value:
22-
23-
- [ABS](../../t-sql/functions/abs-transact-sql.md)
24-
- [ACOS](../../t-sql/functions/acos-transact-sql.md)
25-
- [ASIN](../../t-sql/functions/asin-transact-sql.md)
26-
- [ATAN](../../t-sql/functions/atan-transact-sql.md)
27-
- [ATN2](../../t-sql/functions/atn2-transact-sql.md)
28-
- [CEILING](../../t-sql/functions/ceiling-transact-sql.md)
29-
- [COS](../../t-sql/functions/cos-transact-sql.md)
30-
- [COT](../../t-sql/functions/cot-transact-sql.md)
31-
- [DEGREES](../../t-sql/functions/degrees-transact-sql.md)
32-
- [EXP](../../t-sql/functions/exp-transact-sql.md)
33-
- [FLOOR](../../t-sql/functions/floor-transact-sql.md)
34-
- [LOG](../../t-sql/functions/log-transact-sql.md)
35-
- [LOG10](../../t-sql/functions/log10-transact-sql.md)
36-
- [PI](../../t-sql/functions/pi-transact-sql.md)
37-
- [POWER](../../t-sql/functions/power-transact-sql.md)
38-
- [RADIANS](../../t-sql/functions/radians-transact-sql.md)
39-
- [RAND](../../t-sql/functions/rand-transact-sql.md)
40-
- [ROUND](../../t-sql/functions/round-transact-sql.md)
41-
- [SIGN](../../t-sql/functions/sign-transact-sql.md)
42-
- [SIN](../../t-sql/functions/sin-transact-sql.md)
43-
- [SQRT](../../t-sql/functions/sqrt-transact-sql.md)
44-
- [SQUARE](../../t-sql/functions/square-transact-sql.md)
45-
- [TAN](../../t-sql/functions/tan-transact-sql.md)
46-
47-
> [!NOTE]
48-
> Arithmetic functions, such as ABS, CEILING, DEGREES, FLOOR, POWER, RADIANS, and SIGN, return a value having the same data type as the input value. Trigonometric and other functions, including EXP, LOG, LOG10, SQUARE, and SQRT, cast their input values to **float** and return a **float** value.
49-
50-
All mathematical functions, except for RAND, are deterministic functions. This means they return the same results each time they are called with a specific set of input values. RAND is deterministic only when a seed parameter is specified. For more information about function determinism, see [Deterministic and Nondeterministic Functions](../../relational-databases/user-defined-functions/deterministic-and-nondeterministic-functions.md).
51-
52-
## See Also
53-
54-
- [Arithmetic Operators (Transact-SQL)](../../t-sql/language-elements/arithmetic-operators-transact-sql.md)
55-
- [Built-in Functions (Transact-SQL)](~/t-sql/functions/functions.md)
1+
---
2+
title: "Mathematical Functions (Transact-SQL)"
3+
description: Mathematical Transact-SQL functions in the SQL Server Database Engine.
4+
author: markingmyname
5+
ms.author: maghan
6+
ms.reviewer: randolphwest
7+
ms.date: 12/16/2024
8+
ms.service: sql
9+
ms.subservice: t-sql
10+
ms.topic: reference
11+
helpviewer_keywords:
12+
- "calculations [SQL Server]"
13+
- "mathematical functions [SQL Server]"
14+
- "functions [SQL Server], mathematical"
15+
dev_langs:
16+
- "TSQL"
17+
monikerRange: "=azuresqldb-current || =azuresqldb-mi-current || >=sql-server-2016 || >=sql-server-linux-2017 || =azuresqledge-current || =azure-sqldw-latest || >=aps-pdw-2016 || =fabric"
18+
---
19+
# Mathematical functions (Transact-SQL)
20+
21+
[!INCLUDE [sql-asdb-asdbmi-asa-pdw-fabricse-fabricdw](../../includes/applies-to-version/sql-asdb-asdbmi-asa-pdw-fabricse-fabricdw.md)]
22+
23+
The following scalar functions perform a calculation, usually based on input values that are provided as arguments, and return a numeric value:
24+
25+
- [ABS](abs-transact-sql.md)
26+
- [ACOS](acos-transact-sql.md)
27+
- [ASIN](asin-transact-sql.md)
28+
- [ATAN](atan-transact-sql.md)
29+
- [ATN2](atn2-transact-sql.md)
30+
- [CEILING](ceiling-transact-sql.md)
31+
- [COS](cos-transact-sql.md)
32+
- [COT](cot-transact-sql.md)
33+
- [DEGREES](degrees-transact-sql.md)
34+
- [EXP](exp-transact-sql.md)
35+
- [FLOOR](floor-transact-sql.md)
36+
- [LOG](log-transact-sql.md)
37+
- [LOG10](log10-transact-sql.md)
38+
- [PI](pi-transact-sql.md)
39+
- [POWER](power-transact-sql.md)
40+
- [RADIANS](radians-transact-sql.md)
41+
- [RAND](rand-transact-sql.md)
42+
- [ROUND](round-transact-sql.md)
43+
- [SIGN](sign-transact-sql.md)
44+
- [SIN](sin-transact-sql.md)
45+
- [SQRT](sqrt-transact-sql.md)
46+
- [SQUARE](square-transact-sql.md)
47+
- [TAN](tan-transact-sql.md)
48+
49+
Arithmetic functions, such as `ABS`, `CEILING`, `DEGREES`, `FLOOR`, `POWER`, `RADIANS`, and `SIGN`, return a value having the same data type as the input value. Trigonometric and other functions, including `EXP`, `LOG`, `LOG10`, `SQUARE`, and `SQRT`, cast their input values to **float** and return a **float** value.
50+
51+
All mathematical functions, except for `RAND`, are deterministic functions. This means they return the same results each time they're called with a specific set of input values. `RAND` is deterministic only when a seed parameter is specified. For more information about function determinism, see [Deterministic and nondeterministic functions](../../relational-databases/user-defined-functions/deterministic-and-nondeterministic-functions.md).
52+
53+
## Related content
54+
55+
- [Arithmetic operators (Transact-SQL)](../language-elements/arithmetic-operators-transact-sql.md)
56+
- [What are the SQL database functions?](functions.md)
Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
22
title: "Arithmetic Operators (Transact-SQL)"
3-
description: "Arithmetic Operators (Transact-SQL)"
3+
description: Arithmetic Transact-SQL operators run mathematical operations on two expressions of one or more data types, in the SQL Server Database Engine.
44
author: rwestMSFT
55
ms.author: randolphwest
6-
ms.date: "07/06/2017"
6+
ms.date: 12/16/2024
77
ms.service: sql
88
ms.subservice: t-sql
99
ms.topic: reference
@@ -17,26 +17,26 @@ dev_langs:
1717
- "TSQL"
1818
monikerRange: ">=aps-pdw-2016 || =azuresqldb-current || =azure-sqldw-latest || >=sql-server-2016 || >=sql-server-linux-2017 || =azuresqldb-mi-current || =fabric"
1919
---
20-
# Arithmetic Operators (Transact-SQL)
20+
# Arithmetic operators (Transact-SQL)
21+
2122
[!INCLUDE [sql-asdb-asdbmi-asa-pdw-fabricse-fabricdw-fabricsqldb](../../includes/applies-to-version/sql-asdb-asdbmi-asa-pdw-fabricse-fabricdw-fabricsqldb.md)]
2223

23-
Arithmetic operators run mathematical operations on two expressions of one or more data types. They're run from the numeric data type category. For more information about data type categories, see [Transact-SQL syntax conventions](../../t-sql/language-elements/transact-sql-syntax-conventions-transact-sql.md).
24-
25-
|Operator|Meaning|
26-
|--------------|-------------|
27-
|[+ (Add)](../../t-sql/language-elements/add-transact-sql.md)|Addition|
28-
|[- (Subtract)](../../t-sql/language-elements/subtract-transact-sql.md)|Subtraction|
29-
|[* (Multiply)](../../t-sql/language-elements/multiply-transact-sql.md)|Multiplication|
30-
|[/ (Divide)](../../t-sql/language-elements/divide-transact-sql.md)|Division|
31-
|[% (Modulo)](../../t-sql/language-elements/modulo-transact-sql.md)|Returns the integer remainder of a division. For example, 12 % 5 = 2 because the remainder of 12 divided by 5 is 2.|
32-
33-
The plus (+) and minus (-) operators can also be used to run arithmetic operations on **datetime** and **smalldatetime** values.
34-
35-
For more information about the precision and scale of an arithmetic operation result, see [Precision, Scale, and Length (Transact-SQL)](../../t-sql/data-types/precision-scale-and-length-transact-sql.md).
36-
37-
## See Also
38-
[Mathematical Functions (Transact-SQL)](../../t-sql/functions/mathematical-functions-transact-sql.md)
39-
[Data Types (Transact-SQL)](../../t-sql/data-types/data-types-transact-sql.md)
40-
[Expressions (Transact-SQL)](../../t-sql/language-elements/expressions-transact-sql.md)
41-
42-
24+
Arithmetic operators run mathematical operations on two expressions of one or more data types. They're run from the numeric data type category. For more information about data type categories, see [Transact-SQL syntax conventions](../../t-sql/language-elements/transact-sql-syntax-conventions-transact-sql.md).
25+
26+
| Operator | Meaning |
27+
| --- | --- |
28+
| [+ (Add)](add-transact-sql.md) | Addition |
29+
| [- (Subtract)](subtract-transact-sql.md) | Subtraction |
30+
| [* (Multiply)](multiply-transact-sql.md) | Multiplication |
31+
| [/ (Divide)](divide-transact-sql.md) | Division |
32+
| [% (Modulo)](modulo-transact-sql.md) | Returns the integer remainder of a division. For example, `12 % 5 = 2` because the remainder of `12` divided by `5` is `2`. |
33+
34+
The plus (`+`) and minus (`-`) operators can also be used to run arithmetic operations on **datetime** and **smalldatetime** values.
35+
36+
For more information about the precision and scale of an arithmetic operation result, see [Precision, scale, and length](../data-types/precision-scale-and-length-transact-sql.md).
37+
38+
## Related content
39+
40+
- [Mathematical functions (Transact-SQL)](../functions/mathematical-functions-transact-sql.md)
41+
- [Data types (Transact-SQL)](../data-types/data-types-transact-sql.md)
42+
- [Expressions (Transact-SQL)](expressions-transact-sql.md)

0 commit comments

Comments
 (0)