MySQL Tutorial MySQL Advanced MySQL Database Account Management MySQL References

MySQL ASIN() Function

The MySQL ASIN() function returns arc sine of a value. The returned value will be in the range -𝜋/2 through 𝜋/2. In special cases it returns the following:

  • If the number is not within the range of -1 to 1, then NULL is returned.

Note: ASIN() is the inverse of SIN().




x Required. Specify the value.

Return Value

Returns the arc sine of the value.

Example 1:

The example below shows the usage of ASIN() function.

mysql> SELECT ASIN(0.2);
Result: 0.2013579207903308

mysql> SELECT ASIN(0.8);
Result: 0.9272952180016123

mysql> SELECT ASIN(1);
Result: 1.5707963267948966

mysql> SELECT ASIN(-1);
Result: -1.5707963267948966

mysql> SELECT ASIN(0);
Result: 0

mysql> SELECT ASIN(-0.2);
Result: -0.2013579207903308

mysql> SELECT ASIN(-2);
Result: NULL

Example 2:

Consider a database table called Sample with the following records:

Data 1-1
Data 2-0.5
Data 30
Data 40.5
Data 51

The query given below can be used to calculate the arc sine of records of column x.

SELECT *, ASIN(x) AS ASIN_Value FROM Sample;

This will produce the result as shown below:

Data 1-1-1.5707963267948966
Data 2-0.5-0.5235987755982989
Data 300
Data 40.50.5235987755982989
Data 511.5707963267948966

❮ MySQL Functions