SQL SINH function
Returns the hyperbolic sine: SINH(0) is 0 and SINH(1) is about 1.1752, growing exponentially for large inputs.
- 类别
- Math
- Returns
float / double- In this category
- 41 of 82
语法
SINH(number)
引擎支持
| 引擎 | Support | 备注 |
|---|---|---|
| SQL Server | Not built in | No hyperbolic functions; compute (EXP(x) - EXP(-x)) / 2.0 |
| PostgreSQL | 是 | Built in since PostgreSQL 12 |
| MySQL | Not built in | No hyperbolic functions in MySQL 8.4; use the EXP identity |
| SQLite | 是 | Built in on 3.35+ |
| Oracle | 是 | Built in |
示例
PostgreSQL
SELECT SINH(0) AS zero, SINH(1) AS one; -- 0, 1.1752011936438014
SQL Server
SELECT (EXP(1.0) - EXP(-1.0)) / 2.0 AS sinh_one; -- 1.1752
PostgreSQL
SELECT SINH(x) AS hyperbolic_sine FROM curve_points;
值得了解
- SINH grows exponentially: by x = 710 the double overflows, where EXP itself overflows.
- The identity SINH(x) = (EXP(x) - EXP(-x)) / 2 is the fallback on SQL Server and MySQL, neither of which has hyperbolic functions.
- Hyperbolic functions are not periodic: no [-1, 1] bound and no radians/degrees question; the input is a plain number.
Questions about SINH
Which engines have SINH?
PostgreSQL (12+), SQLite (3.35+) and Oracle. SQL Server and MySQL have no hyperbolic functions; use (EXP(x) - EXP(-x)) / 2.0.
Is SINH the same as SIN?
No. Sine is periodic and bounded; hyperbolic sine grows exponentially and is unbounded. The name comes from the unit hyperbola playing the role the unit circle plays for SIN.
Does SINH overflow?
Yes, past roughly x = 710, where e^x exceeds the double range. Engines raise an overflow error or return Inf depending on the float model.
Browse every function in the SQL function reference, or see what the SQLly desktop app does for your database.
Related on SQLly
Cheat sheets for the engines that have it: PostgreSQL, SQLite, Oracle.
Functions your engine actually has
SQLly's completion lists the built-in functions of the engine you're connected to, whether that's SQL Server, PostgreSQL, MySQL, SQLite or Oracle. Hover a function for help, and signature hints show each argument as you type.