SQL ASIN Function

The SQL ASIN is one of the Mathematical Function, which is used to calculate the trigonometry Arc sine for the specified expression. An Arc sine is also called inverse of a SINE Function. The syntax of the SQL Server ASIN Function is:

SELECT ASIN (Float_Expression)
FROM [Source]

TIP: The ASIN function only accepts float values between -1 and 1. For this demo, we use the Math Table data.

SQL ASIN FUNCTION

SQL ASIN Function Example

The ASIN function is used to calculate the Arc SINE for a given angle. The following query will show multiple ways to use the ASIN function.

We used this SQL Serve function to calculate the Arc sine value for the variable @i. It means ASIN(-0.80) and assigned a new name as ‘Arc Sine’ using ALIAS.

DECLARE @i Float
SET @i = -0.80

SELECT ASIN(@i)AS [Arc Sine]

-- Calculating directly
SELECT ASIN(0.27)AS [Arc Sine]

-- Calculating directly
SELECT ASIN(0.25 + 0.55 - 0.77)AS [Arc Sine]
SQL ASIN FUNCTION 1

We are going to calculate the Arcsine value for all the records present in [Service Grade] using the ASIN Mathematical Function.

SELECT [EnglishProductName]
      ,[Color]
      ,[StandardCost]
      ,[SalesAmount]
      ,[Service Grade] AS Grade
      ,ASIN([Service Grade]) AS [Arc Sine] 
  FROM [Mathemetical Functions]
SQL ASIN FUNCTION 2