MariaDB TAN() Function
In MariaDB, TAN()
is a built-in numeric function that returns the tangent of a specified number.
MariaDB TAN()
Syntax
Here is the syntax of the MariaDB TAN()
function:
TAN(number)
Parameters
number
-
Required. A numeric value used to calculate the tangent.
If you provide the wrong number of parameters, MariaDB will report an error: ERROR 1582 (42000): Incorrect parameter count in the call to native function 'TAN'
.
Return value
The MariaDB TAN()
function returns the tangent of a specified number.
If any parameter number
is NULL
, the TAN()
function will return NULL
.
MariaDB TAN()
Examples
This statement shows the basic usage of the MariaDB TAN()
function:
SELECT
TAN(2.5),
TAN(0.2),
TAN(-0.5),
TAN(-0.2),
TAN(0),
TAN(PI()),
TAN(NULL)\G
Output:
TAN(2.5): 0.5984721441039565
TAN(0.2): 0.19866933079506122
TAN(-0.5): -0.479425538604203
TAN(-0.2): -0.19866933079506122
TAN(0): 0
TAN(PI()): 1.2246467991473532e-16
TAN(NULL): NULL
Conclusion
In MariaDB, TAN()
is a built-in numeric function that returns the tangent of a specified number.