SQLite Tutorial SQLite Advanced SQLite Database SQLite References

SQLite ATAN() Function



The SQLite ATAN() function returns arc tangent of a number x.

Syntax

ATAN(x)

Parameters

x Required. Specify the number used to calculate the arc tangent.

Return Value

Returns the arc tangent of a number.

Example 1:

The example below shows the usage of ATAN() function.

SELECT ATAN(3);
Result: 1.24904577239825

SELECT ATAN(0.5);
Result: 0.463647609000806

SELECT ATAN(0);
Result: 0.0

SELECT ATAN(-0.5);
Result: -0.463647609000806

SELECT ATAN(-3);
Result: -1.24904577239825

Example 2:

Consider a database table called Sample with the following records:

Datax
Data 1-1
Data 2-0.5
Data 30
Data 40.5
Data 51

The statement given below can be used to calculate the arc tangent of records of column x.

SELECT *, ATAN(x) AS ATAN_Value FROM Sample;

This will produce the result as shown below:

DataxATAN_Value
Data 1-1-0.785398163397448
Data 2-0.5-0.463647609000806
Data 300.0
Data 40.50.463647609000806
Data 510.785398163397448

❮ SQLite Functions