SELECT RADIANS(180); -- 3.141592653589793
SELECT RADIANS(90); -- 1.5707963267948966
We can use round() to limit the decimal places.
SELECT ROUND(RADIANS(45), 2); -- 0.79
Syntax
SELECT RADIANS(X);
Value of X is in degree.
SELECT SIN(RADIANS(90)); -- 1
SELECT SIN(RADIANS(0)); -- 0
SELECT ROUND(SIN(RADIANS(180)), 2); -- 0.00
SELECT COS(RADIANS(0)); -- 1
SELECT COS(RADIANS(180)); -- -1
SQL Math References
DEGREES function
Author & Instructor at plus2net
I write and maintain practical tutorials on Python, PHP, SQL, JavaScript, HTML, jQuery, and web development at plus2net. The tutorials focus on clear explanations, working examples, and code that readers can test and adapt while learning.