SELECT RADIANS( 180 ); // Output is 3.14159265358979
SELECT RADIANS( 90 ); // 1.5707963267949
We can use round() to limit the decimal places.
SELECT ROUND(RADIANS( 45 ),2); // Output is 0.79
Syntax
SELECT RADIANS( X );
Value of X is in degree.
SELECT SIN(RADIANS(90)) // Output is 1
SELECT SIN(RADIANS(0)); // Output is 0
SELECT ROUND(SIN(RADIANS(180)),2) // Output is 0.00
SELECT COS(RADIANS(0)); // Output is 1
SELECT COS(RADIANS(180)); // Output is -1
SQL Math References
DEGREES function
Author
🎥 Join me live on YouTubePassionate about coding and teaching, I publish practical tutorials on PHP, Python, JavaScript, SQL, and web development. My goal is to make learning simple, engaging, and project‑oriented with real examples and source code.