LOG10
Applies to ✅ Open Source Edition ✅ Express Edition ✅ Professional Edition ✅ Enterprise Edition
The LOG10()
function calculates the logarithm of a numeric value, given base 10.
SELECT log10(100);
create.select(log10(100)).fetch();
The result being
+-------+ | log10 | +-------+ | 2 | +-------+
Dialect support
This example using jOOQ:
log10(100)
Translates to the following dialect specific expressions:
-- ACCESS, ASE, AURORA_MYSQL, AURORA_POSTGRES, BIGQUERY, DB2, DERBY, DUCKDB, EXASOL, FIREBIRD, H2, HSQLDB, INFORMIX, -- MARIADB, MEMSQL, MYSQL, POSTGRES, SQLDATAWAREHOUSE, SQLITE, SQLSERVER, SYBASE, TRINO, VERTICA log10(100) -- COCKROACHDB (ln(CAST(100 AS numeric)) / ln(CAST(10 AS numeric))) -- HANA, ORACLE, SNOWFLAKE, YUGABYTEDB log(10, 100) -- REDSHIFT, TERADATA log(100)
(These are currently generated with jOOQ 3.19, see #10141), or translate your own on our website
Feedback
Do you have any feedback about this page? We'd love to hear it!