Collections:
LOG2() - Logarithm to Base 2
How to calculate the logarithm of a number to base 2 using the LOG2() function?
✍: FYIcenter.com
LOG2(X) is a MySQL built-in function that
calculates the logarithm of X to base 2.
For example:
SELECT LOG2(1), LOG2(1024), LOG2(65536); -- +---------+------------+-------------+ -- | LOG2(1) | LOG2(1024) | LOG2(65536) | -- +---------+------------+-------------+ -- | 0 | 10 | 16 | -- +---------+------------+-------------+
Reference information of the LOG2() function:
LOG2(X): val Returns the base-2 logarithm of X. Arguments, return value and availability: X: Required. The input value. val: Return value. The logarithm of the input value to base 2. Available since MySQL 4.0.
Related MySQL functions:
⇒ MAKE_SET() - Filtering List with Binary Set
⇐ LOG10() - Logarithm to Base 10
2023-11-15, 1166🔥, 0💬
Popular Posts:
How To Look at the Current SQL*Plus System Settings in Oracle? If you want to see the current values...
What are single-byte character string data types supported in SQL Server Transact-SQL? Single-byte c...
What Is the Difference Between GETDATE() and GETUTCDATE() in SQL Server Transact-SQL? The difference...
How To Convert Binary Strings into Integers in SQL Server Transact-SQL? Binary strings and integers ...
How To Fix the INSERT Command Denied Error in MySQL? The reason for getting the "1142: INSERT comman...