Oracle TAN Function with ExamplesIn this article, I’ll explain the Oracle TAN function, what it is, and show you some examples.

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.

 

Syntax

The syntax of the TAN function is:

TAN (number)

 

Parameters

The parameters of the TAN function are:

  • number (mandatory): The number used to calculate the tangent.
The number parameter can be any numeric data type. If the parameter’s data type is a BINARY_FLOAT, the a BINARY_DOUBLE is returned. Otherwise, the return type is the same as the type of the parameter.

Examples of the TAN Function

Here are some examples of the TAN function, which may help explain how it is used.

Example 1

Result:

TAN_VALUE
1.157821282

 

Example 2

Result:

TAN_VALUE
0.1515894706

 

Example 3

Result:

TAN_VALUE
2.572151622

 

Similar Functions

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!

Want To Improve Your Oracle SQL?

Improve your Oracle SQL queries by signing up to my free 21-day Oracle Tips email course.

We won't send you spam. Unsubscribe at any time. Powered by ConvertKit