SQLite asin() Function

In SQLite, the asin() function returns the arcsine of a value. It returns a result as radians.

Syntax

asin(x)Code language: SQL (Structured Query Language) (sql)

Arguments

x

x is a number, an expression, or a table column that you want to calculate the arcsine.

Return Type

real

The asin() function returns the arcsine of x in radians.

If x is NULL, the function returns NULL. If x is a string that cannot be converted to a number, the asin() function also returns NULL.

Examples

The following example uses the asin() function to calculate the arcsine of a 1:

SELECT asin(1) result;Code language: SQL (Structured Query Language) (sql)

Output:

result
------------------
1.5707963267948966Code language: SQL (Structured Query Language) (sql)

The following statement uses the acos() function to return the arcsine of zero (0):

SELECT asin(0) result;Code language: SQL (Structured Query Language) (sql)

Output:

result
------
0.0Code language: SQL (Structured Query Language) (sql)
Was this tutorial helpful ?