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 cosine is the specified float expression. This is also called arccosine.
Transact-SQL syntax conventions
ACOS ( float_expression )
float_expression
An expression of either type float or of a type that can implicitly convert to float. Only a value ranging from -1.00 to 1.00 is valid. For values outside this range, no value is returned, and ACOS will report a domain error.
float
This example returns the ACOS
value of the specified number.
SET NOCOUNT OFF;
DECLARE @cos FLOAT;
SET @cos = -1.0;
SELECT 'The ACOS of the number is: ' + CONVERT(VARCHAR, ACOS(@cos));
Here's the result set.
---------------------------------
The ACOS of the number is: 3.14159
(1 row(s) affected)
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