MySQL ASIN function is one of the Numeric Function which is used to calculate the trigonometric Arc sine of the specified expression. In this article we will show you, How to find Arc sine value in MySQL using Command Prompt, and Workbench with example.
MySQL ASIN Syntax
The basic syntax of the ASIN in MySQL is as shown below:
SELECT ASIN (Numeric_Expression) FROM Source
- If the Numeric_Expression is between -1 and +1 then ASIN Function will return the arc sine of the value.
- If the Numeric_Expression is not between -1 and +1 then it will return NULL.
- And, If you pass NULL value then the function will return NULL.
To demonstrate this ASIN Numeric function, we are going to use the below shown data
MySQL ASIN Function Example 1
The ASIN Function is used to return the trigonometric Arc sine of any numeric value. The following MySQL query will show multiple ways to use ASIN function.
-- MySQL ASIN Function Example -- Arc Sine of Negative Value SELECT ASIN(-0.53) AS `Arc Sine Value`; -- Arc Sine of Positive Value SELECT ASIN(0.92) AS `Arc Sine Value`; -- Arc Sine of Numeric Expression SELECT ASIN(1.25 + 2.65 - 3.25) AS `Arc Sine Value`; -- Arc Sine of string value SELECT ASIN('0.53') AS `Arc Sine Value`; -- Arc Sine of String SELECT ASIN('MySQL') AS `Arc Sine Value`;
In the below statement, We used ASIN function to find the Arc Sine of different values. And, we assigned a new name to the result as ‘Arc Sine Value’ using ALIAS Column.
MySQL ASIN Example 2
In MySQL, ASIN Numeric Function also allows you to find the arc sine of the data in a table. In this example, we are going to find the arc sine for all the records present in Service Grade column.
-- MySQL Arc Sine Function Example USE mysqltutorial; SELECT Product, Color, StandardCost, Sales, TaxAmt, ServiceGrade, ASIN(ServiceGrade) AS `Arc Sine Value` FROM `numeric functions`;
Thank You for Visiting Our Blog