What is RADIANS() in SQL?

The RADIANS() function converts a value in degrees to the equal value in radians.

Figure 1 shows a mathematical representation of the RADIANS() function.

Figure 1: Mathematical representation of RADIANS() function

Syntax

RADIANS(value)

Parameter

The RADIANS() function takes a number (in degrees) as a parameter.

Return value

The RADIANS() function converts the value in degrees sent as a parameter to a value in radians.

Code

-- 180 to radians
SELECT RADIANS(180);
-- 0 to radians
SELECT RADIANS(0);
-- -180 to radians
SELECT RADIANS(-180);
New on Educative
Learn to Code
Learn any Language as a beginner
Develop a human edge in an AI powered world and learn to code with AI from our beginner friendly catalog
🏆 Leaderboard
Daily Coding Challenge
Solve a new coding challenge every day and climb the leaderboard

Free Resources