COS (Transact-SQL)
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 mathematical function that returns the trigonometric cosine of the specified angle - measured in radians - in the specified expression.
Transact-SQL syntax conventions
Syntax
COS ( float_expression )
Note
To view Transact-SQL syntax for SQL Server 2014 (12.x) and earlier versions, see Previous versions documentation.
Arguments
float_expression
An expression of type float.
Return types
float
Examples
This example returns the COS
value of the specified angle:
DECLARE @angle FLOAT;
SET @angle = 14.78;
SELECT 'The COS of the angle is: ' + CONVERT(VARCHAR,COS(@angle));
GO
Here is the result set.
The COS of the angle is: -0.599465
(1 row(s) affected)
Azure Synapse Analytics and Analytics Platform System (PDW)
This example returns the COS values of the specified angles:
SELECT COS(14.76) AS cosCalc1, COS(-0.1472738) AS cosCalc2;
Here is the result set.
cosCalc1 cosCalc2
-------- --------
-0.58 0.99
See also
प्रतिक्रिया
https://aka.ms/ContentUserFeedback.
जल्द आ रहा है: 2024 के दौरान हम सामग्री के लिए फीडबैक तंत्र के रूप में GitHub मुद्दों को चरणबद्ध तरीके से समाप्त कर देंगे और इसे एक नई फीडबैक प्रणाली से बदल देंगे. अधिक जानकारी के लिए, देखें:के लिए प्रतिक्रिया सबमिट करें और देखें