Everything you need to get
your projects done.

SQL ACOS Function

ACOS returns the arc cosine of the specified number.

The value returned is an angle measured in radians.

ACOS accepts values between -1 to 1. Any other value generates an error.

Example

#

This example returns the arc cosine of the specified values.

SELECT ACOS(1) AS '1',
       ACOS(0) AS '0',
       ACOS(-1) AS '-1'
Result:  1 record
1 0 -1
0 1.5707963267949 3.14159265358979

Note: The second value is π/2 (1.57) and the last value is π (3.14)


Syntax

Syntax of the ACOS function.

ACOS(number)

number -- a value between -1 and 1.


You may also like




Guides


vsn 3.1