In this guide, we will explain how to use the MySQL COT function with syntax and examples.
Description
The MySQL COT function returns the cotangent of a number.
Syntax
The syntax for the COT function is:
COT( number )
Parameters or Arguments
number
The number used to calculate the cotangent.
Note
- The COT function will return NULL or an error (depending on your version of MySQL), if number is 0.
Applies To
The COT function can be used in the following versions :
- MySQL 5.7, MySQL 5.6, MySQL 5.5, MySQL 5.1, MySQL 5.0, MySQL 4.1, MySQL 4.0, MySQL 3.23
Example
Let’s look at some COT function examples and explore how to use the COT function.
For example:
mysql> SELECT COT(4); Result: 0.8636911544506167 mysql> SELECT COT(-1); Result: -0.6420926159343306 mysql> SELECT COT(3.4); Result: 3.7833373375604737
Next Topic : Click Here
Pingback: MySQL: COS Function | Adglob Infosystem Pvt Ltd