Product Documentation

SQL Reference Guide

Previous Topic

Next Topic

COT SQL Scalar Function

Syntax

COT(expression)

Description

The scalar function COT returns the cotangent of the expression. COT takes an angle expression and returns the ratio of two sides of a right angle triangle. The ratio is the length of the side adjacent to the angle to the length of the side opposite to the angle.

Example

SELECT COT(45 * PI()/180) 'COT OF 45 DEGREES' from admin.syscalctable;

COT OF 45 DEGREES

------------------

1.000000000000000

1 record selected

Details

Expression specifies an angle in radians. Expression must evaluate to an approximate numeric data type. To convert degrees to radians, multiply degrees by PI/180. To convert radians to degrees, multiply radians by 180/PI.

Note: ODBC compatible

TOCIndex