×

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 CEIL() function

In this context, we will learn how we can use the MySQL CEIL () function with proper syntax and good examples. Introduction of MySQL CEIL() function Input is taken by the CEIL()...

3 minutes read.

MySQL Full text index

Full text index The full-text index in the table isused to search the full text of the data. This index assigns to the table using a "FULLTEXT" keyword. First, the table...

3 minutes read.

MySQL REVERSE() function

In this context, we will learn how we can use the MySQL REVERSE() function with proper syntax and good examples. Introduction of MySQL REVERSE() function This function could be used to reverse...

2 minutes read.

MySQL Error 1046 - No Database Selected

What is MySQL? MySQL is a Relational Database Management System (RDBMS). SQL in MySQL is the abbreviation of "Structured Query Language", which Oracle developed it in 1995. It is one of...

1 minute read.

MySQL Subquery

The subquery is a MySQL query used to manage data operations. Mainly subquery helps to retrieve data with the necessary condition. It creates a nested query with two different queries....

5 minutes read.

MySQL UPDATE JOIN

The UPDATE JOIN is a MySQL statement used to perform cross-table updates that means we can update one table using another table with the JOIN clause condition. The "update join"...

5 minutes read.

MySQL Stored Procedure

MySQL creates the "stored procedure" function to operate database information. You can use parameters, blocks, and statements to create a new procedure. The procedure requires a database table to use...

3 minutes read.

MySQL database queries

MySQL database queries Database queries help to create, use, show and, delete the database. A Database is a collection of several tables and data. The database uses SQL language to perform...

3 minutes read.

MySQL Invisible Index

Invisible Index MySQL index decides an option to the availability of the index for the query optimizer. This index shows the visible and invisible options to displays the index column in...

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 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 EXPORT_SET() function

In this context, we will learn how we can use the MySQL EXPORT_SET() function with proper syntax and good examples. Introduction of MySQL EXPORT_SET() function This function returns a string and shows...

3 minutes read.

MySQL CEILING() function

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

2 minutes read.

MySQL variable

The MySQL variable is essential for storing data in the table. The variable declares data with a specific name or label to avoid confusion. This data label is used in...

6 minutes read.

MySQL DAY() function

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

2 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 PERIOD_DIFF() function

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

2 minutes read.

MySQL RAND() function

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

3 minutes read.

MySQL AVG function

This function works on numerical data type values. The average function shows the average value of the data set. If an average function returns a null value, then the row...

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.