SQL Dialects Reference/Functions and expressions/Math functions/Trigonometric functions
From Wikibooks, open books for an open world
[edit] Trigonometric functions
This page includes comparison tables which can be big and complex.
While it's perfectly all right to view them in their complete state, it is recommended to install a comparison tables extension that would allow to select particular columns of interest for comparison.
| SQL version | Feature | Standard | DB2 | Firebird | Ingres | Linter | MSSQL | MySQL | Oracle | PostgreSQL | SQLite | Virtuoso |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ? | Arc sine | ? | ASIN(x) | ASIN(x) | ASIN(X) | ASIN(x) | ASIN(x) | ASIN(x) | ASIN(x) | ASIN(x) | N/A | ASIN(x) |
| ? | Arc cosine | ? | ACOS(x) | ACOS(x) | ACOS(x) | ACOS(x) | ACOS(x) | ACOS(x) | ACOS(x) | ACOS(x) | N/A | ACOS(x) |
| ? | Arc tangent of x | ? | ATAN(x) | ATAN(x) | ATAN(x) | ATAN(x) | ATAN(x) | ATAN(x) | ATAN(x) | ATAN(x) | N/A | ATAN(x) |
| ? | Arc tangent of x and y | ? | ATAN2(x, y) | ATAN2(x,y) | ATAN2(x, y) | ATAN2(x, y) | ATN2(x, y) | ATAN2(x, y) ATAN(x, y) |
ATAN2(x, y) ATAN2(x / y) |
ATAN2(x,y) | N/A | ATAN2(x, y) |
| ? | Sine | ? | SIN(x) | SIN(x) | SIN(x) | SIN(x) | SIN(x) | SIN(x) | SIN(x) | SIN(x) | N/A | SIN(x) |
| ? | Cosine | ? | COS(x) | COS(x) | COS(x) | COS(x) | COS(x) | COS(x) | COS(x) | COS(x) | N/A | COS(x) |
| ? | Tangent | ? | TAN(x) | TAN(x) | TAN(x) | TAN(x) | TAN(x) | TAN(x) | TAN(x) | TAN(x) | N/A | TAN(x) |
| ? | Cotangent | ? | COT(x) | COT(x) | N/A | N/A | COT(x) | COT(x) | N/A | COT(x) | N/A | COT(x) |
| ? | Hyperbolic sine | ? | SINH(x) | SINH(x) | N/A | SINH(x) | N/A | N/A | SINH(x) | N/A | N/A | N/A |
| ? | Hyperbolic cosine | ? | COSH(x) | COSH(x) | N/A | COSH(x) | N/A | N/A | COSH(x) | N/A | N/A | N/A |
| ? | Hyperbolic tangent | ? | TANH(x) | TANH(x) | N/A | TANH(x) | N/A | N/A | TANH(x) | N/A | N/A | N/A |
| ? | Hyperbolic arctangent | ? | ATANH(x) | ? | N/A | ? | N/A | N/A | N/A | N/A | N/A | ? |
Notes:
- Firebird users need to register functions to make them available. The registration is done once for each database.
This page may need to be