Skip to content

Latest commit

 

History

History
50 lines (43 loc) · 3.07 KB

File metadata and controls

50 lines (43 loc) · 3.07 KB
title Mathematical Functions (Transact-SQL) | Microsoft Docs
ms.custom
ms.date 07/06/2017
ms.prod sql
ms.prod_service sql-database
ms.component t-sql|functions
ms.reviewer
ms.suite sql
ms.technology t-sql
ms.tgt_pltfrm
ms.topic language-reference
dev_langs
TSQL
helpviewer_keywords
calculations [SQL Server]
mathematical functions [SQL Server]
functions [SQL Server], mathematical
ms.assetid 46495a2e-81d0-4677-9d72-9db083cd1023
caps.latest.revision 24
author edmacauley
ms.author edmaca
manager craigg

Mathematical Functions (Transact-SQL)

[!INCLUDEtsql-appliesto-ss2012-xxxx-xxxx-xxx-md]

The following scalar functions perform a calculation, usually based on input values that are provided as arguments, and return a numeric value:

ABS DEGREES RAND
ACOS EXP ROUND
ASIN FLOOR SIGN
ATAN LOG SIN
ATN2 LOG10 SQRT
CEILING PI SQUARE
COS POWER TAN
COT RADIANS

Note

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.

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.

See Also

Arithmetic Operators (Transact-SQL)
Built-in Functions (Transact-SQL)