The SQL RADIANS function is one of the Mathematical function which is used to converts an angle measured in degrees to an approximately equivalent angle measured in radians.

In this article, we will show you, How to use/write SQL Server RADIANS function with example.

## SQL RADIANS Function Syntax

The basic syntax of the SQL Server RADIANS Function is as shown below:

SELECT RADIANS (numeric_Expression) FROM [Source]

**Numeric_Expression:** The RADIANS function accepts exact numeric, or an approximately numeric data types. Remember that, it will not accept the Bit data type.

## SQL RADIANS Function Example 1

The SQL server RADIANS Function allows you to converts degrees to an approximately equivalent angle measured in radians.

In this example, We are going to find the radians of different data (both the positive and negative values) and display the output

**T-SQL CODE**

DECLARE @i INT SET @i = 120 SELECT RADIANS(@i)AS [Radians Result 1] -- Finding Degrees directly SELECT RADIANS(1) AS [Radians Result 2] SELECT RADIANS(90) AS [Radians Result 3] SELECT RADIANS(60) AS [Radians Result 4] SELECT RADIANS(45) AS [Radians Result 5] SELECT RADIANS(-30) AS [Radians Result 6] SELECT RADIANS(-140.579) AS [Radians Result 7]

**OUTPUT**

**ANALYSIS**

Within this radians function example query, the below lines of code is used to declare float variable and assigning the random value.

DECLARE @i INT SET @i = 120

Next, we are calculating the radiant value of degree @i. We also assigned new name to the result as ‘Radians Result 1’. For this, we are using SQL ALIAS Column.

SELECT RADIANS(@i)AS [Radians Result 1]

In the following multiple statement, We used Sql Server RADIANS function directly on the positive float values.

SELECT RADIANS(90) AS [Radians Result 3] SELECT RADIANS(60) AS [Radians Result 4] SELECT RADIANS(45) AS [Radians Result 5]

Next, We used this RADIANS function directly on the negative float values

SELECT RADIANS(-30) AS [Radians Result 6] SELECT RADIANS(-140.579) AS [Radians Result 7]

## SQL RADIANS Function Example 2

In this example, we are using the radians function on existing product Sales table.

For this demonstration, We are going to convert all the records that are present in the [StandardCost] and [ListPrice] columns to equivalent radiant values using RADIANS Function.

**T-SQL CODE**

SELECT [EnglishProductName] ,[Color] ,[StandardCost] ,RADIANS([StandardCost]) AS [Cost_Radian result] ,[ListPrice] ,RADIANS([ListPrice]) AS [List_Radian result] ,[DealerPrice] ,[SalesAmount] FROM [SQL Tutorial].[dbo].[Product Sales]

**OUTPUT**

Thank You for Visiting Our Blog