The TAN function in Oracle SQL / PLSQL is used to calculate tangent of numeric value where numeric value is provided in radian format.
It’s mathematically equal to TAN(N).
Syntax for the TAN function in Oracle SQL / PLSQL is:
SELECT TAN(radian)
FROM table_name;
Let’s take an example for understanding:
Suppose we want to get the tangent of 30 degree.
SELECT TAN(30*22/(7*180)) FROM dual;
The output of the above statement will be:
TAN(30*22/(7*180)) |
0.57763130100345 |
Notice that we have changed 30 degrees into radians while passing it in TAN function.