Open In App

ASIN() Function in SQL Server

Last Updated : 29 Dec, 2020
Improve
Improve
Like Article
Like
Save
Share
Report

ASIN() function :

This function in SQL Server is used to return the arc sine or the inverse sine of a specified value. Input to the arc-sine function should must be in between -1 and 1 (inclusive), otherwise this function returns NULL.

Features :

  • This function is used to find the arc sin or the inverse sin of a specified value.
  • This function accepts a single parameter.
  • The range of accepted parameter is in between -1 and 1 (inclusive), otherwise this function returns NULL.
  • The returned value will be in radians.

Syntax :

SELECT ASIN(number);

Parameter :

This method accepts a parameter as given below:

  • number: Specified numeric value whose inverse sine is going to be returned.

Returns :

It returns the arc sine or the inverse sine of a specified value.

Example-1 :

Getting the inverse sine of a specified value -1

SELECT ASIN(-1);

Output :

-1.5707963267948966

Example-2 :

Getting the inverse sine of a specified value 1

SELECT ASIN(1);

Output :

1.5707963267948966

Example-3 :

Using ASIN() function with a variable and getting the inverse sine of a specified value 0.

DECLARE @Parameter_Value INT;
SET @Parameter_Value = 0;
SELECT ASIN(@Parameter_Value);

Output :

0.0

Example-4 :

Using ASIN() function with a variable and getting the inverse sine of a specified float value “0.45”.

DECLARE @Parameter_Value float;
SET @Parameter_Value = 0.45;
SELECT ASIN(@Parameter_Value);

Output :

0.46676533904729639

Application :

This function is used to return the arc sine or the inverse sine of a specified value.


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads