Dofactory.com
Dofactory.com
Earn income with your data and sql skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.

SQL TAN Function

TAN returns the tangent of an angle in radians.

TAN, along with SIN and COS, is one of the primary trigonometric functions.

Example

#

This example returns the tangent of the angles measured in radians.

SELECT TAN(PI()/4) AS '45 degrees',
       TAN(0) AS '0 degrees',
       TAN(-PI()/4) AS '-45 degrees'
Result:  1 record
45 degrees 0 degrees -45 degrees
1 0 -1

Note: The PI functions returns the constant value of π (3.1415).


Syntax

Syntax of the TAN function.

TAN(angle)

angle -- a number representing an angle in radians.


You may also like



Last updated on Dec 21, 2023

Earn income with your data and sql skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.