Purpose
You can call this function to return the cosine of a specified angle. The return value is in the range of [-1, 1].
Syntax
COS(x)
Parameters
x is of a numeric data type whose value can be any real number (an angle expressed in radians), or is of any data type that can be implicitly converted to a numeric data type.
Return type
If x is of the BINARY_FLOAT data type, the return type is BINARY_DOUBLE. Otherwise, the return type is a numeric data type same as that of x.
Examples
The following example returns the cosine of 0 degrees.
obclient> SELECT COS(0) FROM DUAL;
+--------+
COS(0)
+--------+
1
+--------+
1 row in set