📣
TiDB Cloud Premium is now in public preview. Unlimited growth, instant elasticity, advanced security for enterprise workloads. Try it out →

LOG2



Returns the base-2 logarithm of x. If x is less than or equal to 0.0E0, the function returns NULL.

Syntax

LOG2( <x> )

Examples

SELECT LOG2(65536); ┌─────────────┐ │ log2(65536) │ ├─────────────┤ │ 16 │ └─────────────┘

Was this page helpful?