Oracle TAN() Function

Oracle TAN() is a built-in function that returns the tangent of the specified radian.

Oracle TAN() syntax

Here is the syntax for the Oracle TAN() function:

TAN(num)

Parameters

num

Required. It can be any numeric data type or any non-numeric data type that can be implicitly converted to a numeric data type.

Return Value

Oracle TAN() function returns the tangent of the specified radian.

if the parameter is BINARY_FLOAT, TAN() returns BINARY_DOUBLE. Otherwise TAN() returns the same numeric data type as the parameter.

If any parameter is NULL, TAN() will return NULL.

Oracle TAN() Examples

Here are some examples that demonstrate the usage of the Oracle TAN() function.

Basic Usage

SELECT
    TAN(0.2)
FROM dual;

Output:

_____________________________________________
   0.2027100355086724833213582716475344826277

NULL Parameters

If any parameter is NULL, TAN() will return NULL.

SET NULL 'NULL';
SELECT
    TAN(NULL)
FROM dual;

Output:

   TAN(NULL)
____________
        NULL

In this example, we use the statement SET NULL 'NULL'; to display NULL values as the string 'NULL'.

Conclusion

Oracle TAN() is a built-in function that returns the tangent of the specified radian.