TAN function calculates the tangent of an input argument.
In math, given the ABC triangle, the tan(A) is defined as the ratio between the side opposite to the A (a) and the side adjacent to the A (b) as follows:
tan A = a / b
For the inverse of the
TAN function, see the
The following shows the syntax of the
TAN function accepts a
numeric_expression that represents the angle in radians for which the tangent is calculated.
TAN function returns a floating-point number.
The following example returns the tangent of π/4, 0, and -π/4.
SELECT TAN(-PI()/4), TAN(0), TAN(PI()/4);
tan | tan | tan
-1 | 0 | 1
Note that we use
PI function to get the π constant
Most database systems support the
TAN function with the same behavior.