×

MySQL ASIN() Function

In this context we will learn how we can use the ASIN() function in MySQL with proper syntax and good example.

Introduction of MySQL ASIN() function

The arc sine value of a number in the range of [ -1 to 1 ] is returned by the ASIN() function, which is a mathematical function in MySQL. When the number is not in the range of -1 to 1, then it will return a null value as output.

Syntax of the MySQL ASIN () function

The syntax of the MySQL ASIN () function is given as follows:
ASIN(num)

Parameter or arguments used in MySQL ASIN () function:

Only one parameter is accepted by the ASIN ( num ) function, and in ASIN () function, num is the parameter. Now we will understand it with the help of examples.

Num: It is the number which we want to calculate the arc sine value of that number. It should be in the range of -1 to 1.

Returns: It gives us the arc sine of the mentioned number.

Application used for ASIN() function:

The ASIN() function can be used in the given below MySQL versions.

  • MySQL 5.7
  • MySQL 5.6
  • MySQL 5.5
  • MySQL 5.1
  • MySQL 5.0
  • MySQL 4.1
  • MySQL 4.0
  • MySQL 3.23

Examples of MySQL ASIN() function:

Example: 1
Here, we will derive the arc sine value of 1 using the ASIN() function in MySQL.

SELECT ASIN( 1) as ASIN_ value ;

Output:

ASIN_ value
1.5707963267948966
1 row in set (0.00 sec)

Example 2:

Now we will derive the arc sine value of a number in the range ( 0, 1) using the ASIN() function in MySQL.

SELECT ASIN( 0.25 ) ASIN_ value ;

Output:

ASIN_ value
0.25268025514207865
1 row in set (0.00 sec)

Example 3:

Here, we will derive the arc sine value of a number which is in the range ( 0, -1) using the ASIN() function in MySQL.

Select ASIN( -0.35 ) as ASIN_ value;

Output:

ASIN_ value
-0.35757110364551026
1 row in set (0.00 sec)

Example 4:
Now we will derive the arc sine value of a number which is not in the range ( 0, -1) using the ASIN() function in MySQL.

SELECT ASIN(2.75) as ASIN_ value;

Output:

ASIN_ value
Null
1 row in set (0.00 sec)

Example 5:
Here, we will see how we can get the arc sine value of a numeric column in a table of the database.

Y
-2
-1
-0.50
0
0.50
1
2

Table: Number

SELECT ASIN ( y ) as ASIN_ value from Number;

Output:

YASIN_ value
-2Null
-1-1.5707963267948966
-0.50-0.5235987755982989
00
0.500.5235987755982989
11.5707963267948966
2Null

1 row in set (0.00 sec)

In this above context, we have learned how we can use the ASIN() function for a number whose arc sine value we want to calculate.


Related Topics

MySQL PERIOD_ADD() function

In this context, we will learn how we can use the MySQL PERIOD_ADD() function with proper syntax and good examples. Introduction of MySQL PERIOD_ADD() function In MySQL, PERIOD_ADD() function will help to...

2 minutes read.

MySQL IF statement

The IF statement shows the true condition of the control flow function. The first condition is necessary to fulfill the requirement. The other condition is optional in the "IF" statement....

3 minutes read.

MySQL Database Introduction

MySQL - Database Introduction: The database plays an essential role in MySQL for storing and modifying the data. The database creates and keeps multiple tables. The database organizes and manipulates...

8 minutes read.

MySQL Union

MySQL contains the same categories of data in a different table. Sometimes, you require multiple tables to collect data together. MySQL union is a function to combine two table's data...

5 minutes read.

MySQL Date and Time function

The date function displays day, year, month, time, and current date. It shows the date and time as per the requirement of the applications. The data either store on the...

8 minutes read.

MySQL LEAST function

This statement displays the smallest value of the table. The LEAST function returns a null value when the table contains a null value. If the table contains all numerical values,...

2 minutes read.

MySQL ROUND() function

In this context, we will learn how we can use the MySQL ROUND() function with proper syntax and good examples. Introduction of MySQL ROUND() function The ROUND() function in MySQL is used...

3 minutes read.

MySQL POW() function

In this context, we will learn how we can use the MySQL POW() function with proper syntax and good examples. Introduction of MySQL POW() function This function in MySQL is used to...

2 minutes read.

MySQL LOG2() function

In this context, we will learn how we can use the MySQL LOG2() function to calculate the Logarithm of a specific number with base 2 with proper syntax and examples. Introduction...

2 minutes read.

MySQL Index

An index is a widely used method to access table information quickly. MySQL requires an index for operating table data stored in rows and columns. It's an entry point of...

3 minutes read.

MySQL Drop Index

Sometimes we have an index that is not required in data operations. In that case, we can use this statement to remove an existing index from the table. We can...

4 minutes read.

find_in_set() function in MySQL

This Function is used for finding the position of a particular string from the list of strings. For suppose if the specified string is repeated multiple times, then this functions...

4 minutes read.

MySQL LOG() function

In this context, we will learn how we can use the MySQL LOG () function with proper syntax and good examples. Introduction of MySQL LOG() function The LOG() function in MySQL is...

3 minutes read.

MySQL DATE_FORMAT() function

In this context, we will learn how we can use the MySQL DATE_FORMAT() function with proper syntax and good examples. Introduction of MySQL DATE_FORMAT() function DATE_FORMAT() function in MySQL is used to...

3 minutes read.

MySQL QUARTER() function

In this context, we will learn how we can use the MySQL QUARTER() function with proper syntax and good examples. Introduction of MySQL QUARTER() function The QUARTER() function in MySQL returns the...

3 minutes read.

MySQL MONTHNAME() function

In this context, we will learn how we can use the MySQL MONTHNAME() Function with proper syntax and good examples. Introduction of MySQL MONTHNAME() function In MySQL the MONTHNAME() Function is used...

3 minutes read.

MySQL LOCATE() function

In this context, we will learn how we can use the MySQL LOCATE() function with proper syntax and good examples. Introduction of MySQL LOCATE() function LOCATE() function in MySQL is used for...

3 minutes read.

MySQL Data Types

Introduction of the Data types In the data file, we have several information such as names, numbers, marks, and other information. This information specifies categories such as numbers, characters, and decimal...

8 minutes read.

MySQL Advance table Query

MySQL Advance table Query The table is created by index, rows, and columns in the MySQL database. The user saves their information in matrix format. The database requires a query to...

14 minutes read.

MySQL Triggers

MySQL trigger is a function of the stored procedure to respond to the system program. This function responds and runs any data table event automatically. You can use it for...

5 minutes read.