SQL TAN Function

TAN returns the tangent of an angle in radians.

TAN, along with SIN and COS, is one of the primary trigonometric functions.

Example

#

This example returns the tangent of the angles measured in radians.

SELECT TAN(PI()/4) AS '45 degrees',
       TAN(0) AS '0 degrees',
       TAN(-PI()/4) AS '-45 degrees'
Result:  1 record
45 degrees 0 degrees -45 degrees
1 0 -1

Note: The PI functions returns the constant value of π (3.1415).


Syntax

Syntax of the TAN function.

TAN(angle)

angle -- a number representing an angle in radians.


You may also like



Guides


vsn 3.1