Events
Mar 31, 11 PM - Apr 2, 11 PM
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Applies to:
SQL Server
Azure SQL Database
Azure SQL Managed Instance
Azure Synapse Analytics
Analytics Platform System (PDW)
SQL analytics endpoint in Microsoft Fabric
Warehouse in Microsoft Fabric
A function that returns the angle, in radians, whose tangent is a specified float expression. This is also called arctangent.
Transact-SQL syntax conventions
ATAN ( float_expression )
float_expression
An expression of either type float or of a type that implicitly convert to float.
float
This example takes a float expression and returns the ATAN of the specified angle.
SELECT 'The ATAN of -45.01 is: ' + CONVERT(varchar, ATAN(-45.01))
SELECT 'The ATAN of -181.01 is: ' + CONVERT(varchar, ATAN(-181.01))
SELECT 'The ATAN of 0 is: ' + CONVERT(varchar, ATAN(0))
SELECT 'The ATAN of 0.1472738 is: ' + CONVERT(varchar, ATAN(0.1472738))
SELECT 'The ATAN of 197.1099392 is: ' + CONVERT(varchar, ATAN(197.1099392))
GO
Here's the result set.
-------------------------------
The ATAN of -45.01 is: -1.54858
(1 row(s) affected)
--------------------------------
The ATAN of -181.01 is: -1.56527
(1 row(s) affected)
--------------------------------
The ATAN of 0 is: 0
(1 row(s) affected)
----------------------------------
The ATAN of 0.1472738 is: 0.146223
(1 row(s) affected)
-----------------------------------
The ATAN of 197.1099392 is: 1.56572
(1 row(s) affected)
This example takes a float expression and returns the arctangent of the specified angle.
SELECT ATAN(45.87) AS atanCalc1,
ATAN(-181.01) AS atanCalc2,
ATAN(0) AS atanCalc3,
ATAN(0.1472738) AS atanCalc4,
ATAN(197.1099392) AS atanCalc5;
Here's the result set.
atanCalc1 atanCalc2 atanCalc3 atanCalc4 atanCalc5
--------- --------- --------- --------- ---------
1.55 -1.57 0.00 0.15 1.57
CEILING (Transact-SQL)
Mathematical Functions (Transact-SQL)
Events
Mar 31, 11 PM - Apr 2, 11 PM
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register today