MySQL DEGREES function is one of the Numeric Functions, which is useful to convert the radiant values into degrees. The syntax of the DEGREES in MySQL is as shown below:

SELECT DEGREES (Numeric_Expression)
FROM Source

To demonstrate this DEGREES Numeric function, we are going to use the below shown data.

Numeric Functions Source Table 1

MySQL DEGREES Function Example

This MySQL method converts the radiant values to degrees, and the following query shows multiple ways to use this.

-- Finding for Negative Value
SELECT DEGREES(-10.75) AS `Value in Degrees`;

-- Finding for Positive Value
SELECT DEGREES(2.67) AS `Value in Degrees`;

-- Example along with PI()
SELECT DEGREES(PI()) AS `Value in Degrees`;
SELECT DEGREES(PI()/2) AS `Value in Degrees`;
SELECT DEGREES(PI()/3) AS `Value in Degrees`;

-- string value
SELECT DEGREES('6.74') AS `Value in Degrees`;

-- on String text
SELECT DEGREES('MySQL') AS `Value in Degrees`;

From the below screenshot, you can see that we used DEGREES function on different values.

MySQL Degrees Function 2


MySQL Degrees Function 25

In MySQL, this Numeric also allows you to find the degree values for the column data. In this example, we are going to find the equivalent values for all the records present in the Service Grade column.

SELECT Product, Color,
		StandardCost, Sales, TaxAmt,
        DEGREES(ServiceGrade) AS `Grade Value inDegrees`
FROM `numeric functions`;

MySQL Degrees Function 3