What is COT() Function in SQL

SQL COT() is a built-in function that is used for finding the cotangent of the specified angle – in radians – in the specified float expression.

MySQL COT() returns the cotangent of a number.

The SQL COT() returns the cotangent of a number.

A number whose cotangent value is to be retrieved. The above MySQL statement will return the cotangent of the number specified as an argument.

Syntax

SELECT COT (float_expression);

Parameters

Float_expression: An expression of float or any other type which is implicitly converted to float whose cotangent value is to be retrieved. It is required. It is a numeric value. If the number is 0, then an error or NULL is returned.

Examples

Query 1

SELECT COT (1);

Output

0.642092615934331

Explanation

Here, the cotangent value is returned.

Query 2

SELECT COT (2);

Output

-0.457657554360286

Explanation

Here, the cotangent value is returned.

Query 3

SELECT COT (1.3);

Output

0.27761564654112514

Explanation

Here, the cotangent value is returned.

Query 4

SELECT COT (2.5 + 0.3);

Output

-2.8127034948255432

Explanation

Here, the cotangent value of the expression is returned.

Conclusion

SQL COT() returns the cotangent of a number.

That’s it.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.