DEGREES
DEGREES(angle)
Section titled “DEGREES(angle)”- angle: This parameter represents a numeric value that specifies the radians. It is the radian value that will be converted into degrees by the DEGREES() function.
Example
Section titled “Example”SELECT DEGREES(PI());Output
Section titled “Output”180Explanation
Section titled “Explanation”The DEGREES() function in MySQL is used to convert the specified radian value into degrees. In this example, PI(), a function that returns the value of PI, is passed as a parameter to the DEGREES() function. Since the PI radian equals 180 degrees, the function returns 180.
DEGREES( numeric_expression )
Section titled “DEGREES( numeric_expression )”- numeric_expression: A numeric expression that includes the angle in radians for which to return the degrees. This can be an expression of the exact numeric or approximate numeric data type category, excluding the bit data type.
Example
Section titled “Example”SELECT DEGREES(3.14159);Output
Section titled “Output”180Explanation
Section titled “Explanation”The DEGREES function in SQL Server converts a value in radians to degrees. In the example, the approximation of pi (3.14159) is converted to approximately 180 degrees.
DEGREES(number)
Section titled “DEGREES(number)”- number: This is a numeric value (in radians) which we want to convert to degrees.
Example
Section titled “Example”SELECT DEGREES(0.5) as Degrees from dual;Output
Section titled “Output”DEGREES--------28.64788975654116Explanation
Section titled “Explanation”The DEGREES function is used to convert radians to degrees. So, 0.5 radians is approximately 28.65 degrees.