SQL BIT_COUNT()函数

BIT_COUNT(numeric_value)

BIT_COUNT()函数返回活跃在数字值的位数。 下面的例子演示了使用BIT_COUNT()函数返回激活位的数字为一系列的数字:

SQL> SELECT
          BIT_COUNT(2) AS TWO,
          BIT_COUNT(4) AS FOUR,
          BIT_COUNT(7) AS SEVEN
+-----+------+-------+
| TWO | FOUR | SEVEN |
+-----+------+-------+
|   1 |    1 |     3 |
+-----+------+-------+
1 row in set (0.00 sec)

        原文作者:SQL教程
        原文地址: https://www.yiibai.com/sql/sql-bit_count-function.html
        本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
    点赞