Mysql Tan Function

MySQL: TAN Function

This tutorial explains how to use the MySQL TAN function with syntax and examples.

Description

The MySQL TAN function returns the tangent of a number.

Syntax

The syntax for the TAN function in MySQL is:

TAN( number )

Parameters or Arguments

number

The number used to calculate the tangent. It is expressed in radians.

Applies To

The TAN function can be used in the following versions of MySQL:

  • MySQL 5.7, MySQL 5.6, MySQL 5.5, MySQL 5.1, MySQL 5.0, MySQL 4.1, MySQL 4.0, MySQL 3.23

Example

Let's look at some MySQL TAN function examples and explore how to use the TAN function in MySQL.

For example:

mysql> SELECT TAN(0.75);
Output: 0.9315964599440725

mysql> SELECT TAN(-3);
Output: 0.1425465430742778

mysql> SELECT TAN(0);
Output: 0