Available in versions: Dev (3.20) | Latest (3.19) | 3.18 | 3.17 | 3.16 | 3.15 | 3.14 | 3.13 | 3.12 | 3.11 | 3.10
DEG
Applies to ✅ Open Source Edition ✅ Express Edition ✅ Professional Edition ✅ Enterprise Edition
The DEG()
function calculates the degrees from a radian value (see also RAD).
SELECT deg(3.14159265359);
create.select(deg(3.14159265359)).fetch();
The result being
+-----+ | deg | +-----+ | 180 | +-----+
Dialect support
This example using jOOQ:
deg(3.14159265359)
Translates to the following dialect specific expressions:
Access
((3.14159265359E0 * 180) / 3.141592653589793)
ASE, Aurora MySQL, Aurora Postgres, ClickHouse, DB2, Derby, DuckDB, Exasol, HSQLDB, Informix, MariaDB, MemSQL, MySQL, Postgres, Redshift, SQLDataWarehouse, SQLServer, SQLite, Snowflake, Sybase, Teradata, Trino, Vertica, YugabyteDB
degrees(3.14159265359E0)
BigQuery
((CAST(3.14159265359E0 AS decimal) * 180) / acos(-1))
CockroachDB
degrees(CAST(3.14159265359E0 AS double precision))
Firebird
((CAST(3.14159265359E0 AS numeric) * 180) / pi())
H2
degrees(CAST(3.14159265359E0 AS double))
Hana
((CAST(3.14159265359E0 AS numeric) * 180) / acos(-1))
Oracle
((CAST(3.14159265359E0 AS number) * 180) / acos(-1))
Generated with jOOQ 3.20. Translate your own SQL on our website
Feedback
Do you have any feedback about this page? We'd love to hear it!