| title | DEGREES (Transact-SQL) | Microsoft Docs | ||
|---|---|---|---|
| ms.custom | |||
| ms.date | 03/06/2017 | ||
| ms.prod | sql-non-specified | ||
| ms.reviewer | |||
| ms.suite | |||
| ms.technology |
|
||
| ms.tgt_pltfrm | |||
| ms.topic | language-reference | ||
| f1_keywords |
|
||
| dev_langs |
|
||
| helpviewer_keywords |
|
||
| ms.assetid | 5208de3c-90a3-4f59-a7e3-10b01bf285bb | ||
| caps.latest.revision | 36 | ||
| author | BYHAM | ||
| ms.author | rickbyh | ||
| manager | jhubbard |
[!INCLUDEtsql-appliesto-ss2008-all_md]
Returns the corresponding angle in degrees for an angle specified in radians.
Transact-SQL Syntax Conventions
-- Syntax for SQL Server, Azure SQL Database, Azure SQL Data Warehouse, Parallel Data Warehouse
DEGREES ( numeric_expression )
numeric_expression
Is an expression of the exact numeric or approximate numeric data type category, except for the bit data type.
Returns the same type as numeric_expression.
The following 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)
The following 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)