Purpose of the Oracle TAN Function
The purpose of the Oracle TAN function is to calculate the tangent of a number.
The tangent is ratio of the length of the side opposite the angle to the length of the side adjacent, which you can read more about here.
It’s one of three similar functions, with the other two being COS and SIN.
The syntax of the TAN function is:
The parameters of the TAN function are:
- number (mandatory): The number used to calculate the tangent.
Examples of the TAN Function
Here are some examples of the TAN function, which may help explain how it is used.
SELECT TAN(4) AS tan_value FROM dual;
SELECT TAN(19) AS tan_value FROM dual;
SELECT TAN(1.2) AS tan_value FROM dual;
Some functions which are similar to the TAN function are:
- COS: Returns the cosine of a number.
- SIN: Returns the sine of a number.
- COSH: Returns the hyperbolic cosine of a number.
- SINH: Returns the hyperbolic sine of a number.
- TANH: Returns the hyperbolic tangent of a number.
If you want to know more about SQL functions, you can find a full list of Oracle SQL functions here.
Lastly, if you enjoy the information and career advice I’ve been providing, sign up to my newsletter below to stay up-to-date on my articles. You’ll also receive a fantastic bonus. Thanks!