The SQL DEGREES() function converts a value in radians to degrees.
SQL DEGREES() is a built-in function that is used to convert a value from radians to degrees. The DEGREES() function requires the number as a parameter and returns the radian values.
Here, the angle (in radians) is provided as an input to the function and the function will return the value in degrees.
SELECT DEGREES (Numeric_expression);
Numeric_expression: The expression whose value in degrees is to be returned.
SELECT DEGREES (1);
Here, the degrees the Numeric_expression is returned.
SELECT DEGREES (2.3);
Here, the degrees of the fractional Numeric_expression is returned.
SELECT DEGREES (PI ());
Here, the degree of the PI function is returned which is passed as an argument to the function.
SELECT DEGREES (ASIN (0.5));
Here, the degree of the ASIN function is returned whose value is passed as an argument to the function.
It works in SQL Server (starting with 2008), Azure SQL Database, Azure SQL Data Warehouse, Parallel Data Warehouse
MySQL DEGREES() Function
MySQL DEGREES() function converts the radian value into degrees.
SQL DEGREES() function converts a number in radians to degrees.