×

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 Aggregate function

The aggregation function works on the multiple values and returns single value output.  It makes the advanced and complex operation simple. The summation (SUM), MAX, AVG, MIN, COUNT functions are...

5 minutes 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 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 INSTR() Function

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

4 minutes read.

MySQL vs SQL

What is MySQL? The open-source MySQL relational database management system is a vital software component for web-based applications. As the data is saved and sent over the internet, databases and related...

6 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 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 FROM_BASE64() function

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

2 minutes read.

MySQL String Function

The string function is used to maintain and operate string values. This function modifies the string data as per function. We can do the concatenation, conversion, removal and replacing the...

4 minutes read.

MySQL EQUI JOIN

An equijoin is an operation that combines multiple tables based on equality or matching column values in the associated tables. This operation links more than two tables based on a...

5 minutes read.

MySQL RIGHT JOIN

MySQL right join links two tables with each other. The left table column connects with the complete right side table. Each row of the right table tries to connect with...

4 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.

MySQL MIN function

The MIN() function determines the minimum or lowest value of the data set. This function works on numerical data type values. If the table displays zero value, then the row...

4 minutes read.

MySQL LIKE() function

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

4 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 ISNULL function

This function is used to check the null value in table data. It returns the result in a Boolean form. If table data is null, then the output becomes 1....

2 minutes read.

MySQL Features

Features of MySQL MySQL is a relational database management system (RDBMS): It is a collection of many programs and makes relations with many other programs. Easy to use MySQL database: MySQL...

2 minutes read.

MySQL LOG10() function

In this context, we will learn how we can use the MySQL LOG10() function with proper syntax and good examples. Introduction of MySQL LOG10() function To evaluate the natural logarithmic value of...

2 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 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.