DEGREES function - Amazon Redshift
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

DEGREES function

Converts an angle in radians to its equivalent in degrees.

Syntax

DEGREES(number)

Argument

number

The input parameter is a DOUBLE PRECISION number.

Return type

DOUBLE PRECISION

Examples

To return the degree equivalent of .5 radians, use the following example.

SELECT DEGREES(.5); +-------------------+ | degrees | +-------------------+ | 28.64788975654116 | +-------------------+

To convert PI radians to degrees, use the following example.

SELECT DEGREES(pi()); +---------+ | degrees | +---------+ | 180 | +---------+