DEGREES (Transact-SQL)

針對以弧度指定的角度,傳回對應的角度。

主題連結圖示Transact-SQL 語法慣例

語法

DEGREES ( numeric_expression )

引數

  • numeric_expression
    這是精確數值或近似數值資料類型類別目錄的運算式,但 bit 資料類型除外。

傳回碼值

傳回與 numeric_expression 相同的類型。

範例

下列範例會傳回 PI/2 弧度中的角度度數。

SELECT 'The number of degrees in PI/2 radians is: ' + 
CONVERT(varchar, DEGREES((PI()/2)));
GO

以下為結果集:

The number of degrees in PI/2 radians is 90       

(1 row(s) affected)

請參閱

參考