ASIN()
Published Jun 28, 2023
Contribute to Docs
The ASIN()
function in SQL is a mathematical function that returns the inverse sine or arcsine of a number.
Syntax
ASIN(number)
The specified number
must be between -1 and 1, otherwise this function returns NULL
.
Example
In this example, the following data is given in the numbers
table:
id | input_number |
---|---|
1 | 0.6 |
2 | 1 |
3 | -0.9 |
The ASIN()
function is used to calculate the arcsine as output_number
:
SELECT id, input_number, ASIN(input_number) AS output_numberFROM numbers;
The output will be:
id | input_number | output_number |
---|---|---|
1 | 0.6 | 0.64350110879328437 |
2 | 1 | 1.5707963267948966 |
3 | -0.9 | -1.1197695149986342 |
Note: For the use of this method with SQL databases like MySQL, SQLite, PostgreSQL, or SQL Server, refer to their respective documentation for more details on the
ASIN()
function implementation and compatibility.
Contribute to Docs
- Learn more about how to get involved.
- Edit this page on GitHub to fix an error or make an improvement.
- Submit feedback to let us know how we can improve Docs.
Learn SQL on Codecademy
- Skill path
Analyze Data with SQL
Learn to analyze data with SQL and prepare for technical interviews.Includes 9 CoursesWith CertificateBeginner Friendly17 hours - Free course
Learn SQL
In this SQL course, you'll learn how to manage large datasets and analyze real data using the standard data management language.Beginner Friendly5 hours