TAN (Transact-SQL)

Applies to: yesSQL Server (all supported versions) YesAzure SQL Database YesAzure SQL Managed Instance yesAzure Synapse Analytics yesAnalytics Platform System (PDW)

Returns the tangent of the input expression.

Topic link icon Transact-SQL Syntax Conventions

Syntax

TAN ( float_expression )  

Note

To view Transact-SQL syntax for SQL Server 2014 and earlier, see Previous versions documentation.

Arguments

float_expression
Is an expression of type float or of a type that can be implicitly converted to float, interpreted as number of radians.

Return Types

float

Examples

The following example returns the tangent of PI()/2.

SELECT TAN(PI()/2);  

Here is the result set.

----------------------  
1.6331778728383844E+16  

Examples: Azure Synapse Analytics and Analytics Platform System (PDW)

The following example returns the tangent of .45.

SELECT TAN(.45);  

Here is the result set.

--------  
0.48

See Also

Mathematical Functions (Transact-SQL)