Curriculum
Course: SQL
Login

Curriculum

SQL

SQL References

0/80

MySQL Functions

0/139

SQL Server Functions

0/84

SQL Quick Ref

0/1
Text lesson

COS

Example

Calculate and return the cosine value of a given number.

SELECT COS(2);

Definition and Usage

The COS() function computes the cosine of a given number.

Syntax

COS(number)

Parameter Values

Parameter

Description

number

Necessary: A value that is numeric.

Technical Details

Works in:

Available in SQL Server from 2008 onward, as well as in Azure SQL Database, Azure SQL Data Warehouse, and Parallel Data Warehouse.

More Examples

Example

Provide the cosine value corresponding to a given number.

SELECT COS(PI());