The SQL 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 ATAN function.
Syntax #
The following shows the syntax of the TAN function.
TAN(numeric_expression)
Argument #
The TAN function accepts a numeric_expression that represents the angle in radians for which the tangent is calculated.
Return #
The TAN function returns a floating-point number.
Examples #
The following example returns the tangent 0:
SELECT
tan(0) result;
result
--------
0
Most database systems support the TAN function with the same behavior.
Thank you for your feedback!