Tutorial Gateway

  • C
  • C#
  • Java
  • Python
  • SQL
  • MySQL
  • Js
  • BI Tools
    • Informatica
    • Talend
    • Tableau
    • Power BI
    • SSIS
    • SSRS
    • SSAS
    • MDX
    • R Tutorial
    • Alteryx
    • QlikView
  • More
    • C Programs
    • C++ Programs
    • Python Programs
    • Java Programs

MySQL DEGREES Function

by suresh

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

MySQL DEGREES Function 1

MySQL DEGREES Function Example 1

The MySQL DEGREES convert the radiant values to degrees. The following query shows multiple ways to use the DEGREES function.

-- MySQL DEGREES Function Example

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

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

-- 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`;

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

-- Degrees Example on String
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

and

MySQL Degrees Function 25

MySQL DEGREES Example 2

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

-- MySQL DEGREES Function Example
USE mysqltutorial;
SELECT Product, Color,
		StandardCost, Sales, TaxAmt,
        ServiceGrade,
        DEGREES(ServiceGrade) AS `Grade Value in Degrees`
FROM `numeric functions`;

MySQL Degrees Function 3

Placed Under: MySQL

  • How to Download MySQL
  • Install MySQL on Windows
  • MySQL Create Database
  • MySQL Delete Database
  • MySQL Create Table
  • MySQL Drop Table
  • MySQL SELECT Statement
  • MySQL ALIAS Column
  • MySQL Distinct
  • MySQL Insert Statement
  • MySQL Delete
  • MySQL Truncate Table
  • MySQL WHERE Clause
  • MySQL Order By
  • MySQL Group By
  • MySQL Having Clause
  • MySQL LIMIT
  • MySQL Arithmetic Operators
  • MySQL COALESCE Function
  • MySQL AND Operator
  • MySQL NOT Operator
  • MySQL OR Operator
  • MySQL XOR Operator
  • MySQL BETWEEN Operator
  • MySQL Not Between Operator
  • MySQL GREATEST Function
  • MYSQL LEAST Function
  • MySQL LIKE Operator
  • MySQL NOT LIKE Operator
  • MySQL IFNULL Operator
  • MySQL NULLIF Operator
  • MySQL INTERVAL Operator
  • MySQL IS Operator
  • MySQL IN Operator
  • MySQL NOT IN Operator
  • MySQL IS NOT NULL
  • MySQL IS NULL
  • MySQL Inner Join
  • MySQL Cross Join
  • MySQL Right Join
  • MySQL Left Join
  • MySQL Aggregate Functions
  • MySQL Date Functions
  • MySQL Date Function
  • MySQL String Functions
  • MySQL Numeric Functions
  • C Tutorial
  • C# Tutorial
  • Java Tutorial
  • JavaScript Tutorial
  • Python Tutorial
  • MySQL Tutorial
  • SQL Server Tutorial
  • R Tutorial
  • Power BI Tutorial
  • Tableau Tutorial
  • SSIS Tutorial
  • SSRS Tutorial
  • Informatica Tutorial
  • Talend Tutorial
  • C Programs
  • C++ Programs
  • Java Programs
  • Python Programs
  • MDX Tutorial
  • SSAS Tutorial
  • QlikView Tutorial

Copyright © 2021 | Tutorial Gateway· All Rights Reserved by Suresh

Home | About Us | Contact Us | Privacy Policy