title | description | author | ms.author | ms.date | ms.service | ms.subservice | ms.topic | f1_keywords | helpviewer_keywords | dev_langs | monikerRange | |||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
DEGREES (Transact-SQL) |
DEGREES (Transact-SQL) |
markingmyname |
maghan |
03/06/2017 |
sql |
t-sql |
reference |
|
|
|
>= aps-pdw-2016 || = azuresqldb-current || = azure-sqldw-latest || >= sql-server-2016 || >= sql-server-linux-2017 || = azuresqldb-mi-current||=fabric |
[!INCLUDE sql-asdb-asdbmi-asa-pdw-fabricse-fabricdw]
This function returns the corresponding angle, in degrees, for an angle specified in radians.
:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: Transact-SQL syntax conventions
DEGREES ( numeric_expression )
numeric_expression
An expression of the exact numeric or approximate numeric data type category.
The return type depends on the input type of numeric_expression:
Input type | Return type |
---|---|
float, real | float |
decimal(p, s) | decimal(38, s) |
int, smallint, tinyint | int |
bigint | bigint |
money, smallmoney | money |
bit | float |
If the result does not fit in the return type, an arithmetic overflow error occurs.
This example returns the number of degrees in an angle of PI/2 radians.
SELECT 'The number of degrees in PI/2 radians is: ' +
CONVERT(VARCHAR, DEGREES((PI()/2)));
GO
[!INCLUDEssResult]
The number of degrees in PI/2 radians is 90
(1 row(s) affected)