Export (0) Print
Expand All

COS (Transact-SQL)


Applies To: SQL Server 2014, SQL Server 2016 Preview

Is a mathematical function that returns the trigonometric cosine of the specified angle, in radians, in the specified expression.

Applies to: SQL Server (SQL Server 2008 through current version), Azure SQL Database, Azure SQL Data Warehouse Public Preview.

Topic link icon Transact-SQL Syntax Conventions

COS ( float_expression )


Is an expression of type float.

The following example returns the COS of the specific angle.

DECLARE @angle float;
SET @angle = 14.78;
SELECT 'The COS of the angle is: ' + CONVERT(varchar,COS(@angle));

Here is the result set.

The COS of the angle is: -0.599465                      

(1 row(s) affected)
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2015 Microsoft