Get started
Load & manage data
Work with data
Administration
Reference & resources
CLUSTER BY
mask
ROW FILTER
Updated Nov 08, 2024
Send us feedback
log2
Applies to: Databricks SQL Databricks Runtime
Returns the logarithm of expr with base 2.
expr
2
log2(expr)
expr: An expression that evaluates to a numeric.
A DOUBLE.
If expr is less than or equal to 0 the result is NULL.
> SELECT log2(2); 1.0
log function
ln function
log1p function
log10 function
pow function