SQL TAN Function

Savigo
You organize your data. Now organize your savings.
Set savings goals, track your progress, and stay on course.
Get Savigo for iPhone 

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
SQL TAN Function

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;

Try it

 result
--------
      0

Most database systems support the TAN function with the same behavior.

Was this helpful?