LOG2() function

SELECT LOG2( X )
Returns natural logarithm of X with base 2. When X is less than or equal to 0.0E0 we get NULL as output.
SELECT LOG2(7); // Output is 2.8073549220576
SELECT LOG2(0.1); // Output is -3.32192809488736
SELECT LOG2(0); // Output is NULL

Using ROUND() with LOG()

SELECT ROUND(LOG2(8),2);// Ouput is 3.00
SELECT ROUND(LOG2(-5),2); // Ouput is NULL
SELECT ROUND(LOG2(9),2); // Output is 3.17


Subscribe

* indicates required
Subscribe to plus2net

    plus2net.com



    Post your comments , suggestion , error , requirements etc here .





    SQL Video Tutorials










    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2021 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer